search for: by_executor

Displaying 1 result from an estimated 1 matches for "by_executor".

Did you mean: _executor
2013 May 14
5
Why joins queries make result readonly?
...doesn''t know how to update that fields, but actually I don''t see that fields. For example I write model class Order < ActiveRecord::Base has_and_belongs_to_many :executors, class_name: ''Specialist'', join_table: ''order_executors'' scope :by_executor, ->(executor_id) { joins(:executors).where(specialists: {id: executor_id} ) } end and make query Order.by_executor(1) so that I get: Order Load (2.0ms) SELECT "orders".* FROM "orders" INNER JOIN "order_executors" ON "order_executors"."order_id&qu...