search for: order_executors

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

2013 May 14
5
Why joins queries make result readonly?
...umns to record so that ActiveRecord 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_ex...