On Tuesday, May 14, 2013 10:26:56 AM UTC+1, Илья Воронцов wrote: > > > Order Load (2.0ms) SELECT "orders".* FROM "orders" INNER JOIN > "order_executors" ON "order_executors"."order_id" = "orders"."id" INNER > JOIN "specialists" ON "specialists"."id" = > "order_executors"."specialist_id" WHERE "specialists"."id" = 1 > => [#<Order id: 20, orderable_id: 11, orderable_type: "PlanDevelopment", > client_id: 1, completion_status: "finished", created_at: "2013-05-13 > 20:48:19", updated_at: "2013-05-14 00:36:38", price: > #<BigDecimal:67e5898,'0.14E2',9(36)>>] > > I see no additional columns but Order.by_executor(1).first.readonly? is > true. Is that necessary? > > One other thing: inspect only ever shows columns from the model table - If you change the select clause to orders.*, order_executors.specialist_id then you'd get the same inspect output but your object would respond to specialist_id
Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/835e3b89-706e-4221-b9dc-80d691731298%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.