What is causing this ActiveRecord::ReadOnlyRecord error?

后端 未结 6 687
我寻月下人不归
我寻月下人不归 2020-12-07 08:18

This follows this prior question, which was answered. I actually discovered I could remove a join from that query, so now the working query is

start_cards =          


        
6条回答
  •  我在风中等你
    2020-12-07 08:56

    Or in Rails 3 you can use the readonly method (replace "..." with your conditions):

    ( Deck.joins(:card) & Card.where('...') ).readonly(false)
    

提交回复
热议问题