After much searching I have been unable to find the correct information on
selecting * between a table join.
Here is the query I am dealing with:
Assignment.joins("LEFT JOIN courses ON courses.id = assignments.context_id
LEFT JOIN enrollments ON enrollments.course_id =
courses.id").includes(:courses).where(:enrollments => {:user_id =>
'8',
:course_id => '1', :workflow_state => 'active'})
And I would like to select, assignments.* and courses.*, but joins only
selects the table calling the joins, assignments.*
Any help on this issue would be greatly appreciated. I feel like I am
missing something simple
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/f2a9fea0-4a6d-4f60-af74-b92d21504176%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.