What is causing this ActiveRecord::ReadOnlyRecord error?

后端 未结 6 674
我寻月下人不归
我寻月下人不归 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:47

    To deactivate it...

    module DeactivateImplicitReadonly
      def custom_join_sql(*args)
        result = super
        @implicit_readonly = false
        result
      end
    end
    ActiveRecord::Relation.send :include, DeactivateImplicitReadonly
    

提交回复
热议问题