On Thu, May 2, 2013 at 1:00 PM, Dave Castellano <li...@ruby-forum.com> wrote:
> I have a join table "galleries_questions".

I'll hope that's really 'galleries_pictures' :-)

> I can't figure out how to query it for pictures in a selected gallery.

How do you have the relationship defined in the models?

> Controller:
> @gallery = Gallery.where("minisection_id" =>
> session[:minisection_id]).first
> @pictures = Gallery.find(@gallery).pictures

Not relevant, but @gallery.pictures would work there...

-- 
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to