Hi, I created a join table and am having trouble figuring out how to query it... create_table "minisections_questions", :id => false, :force => true do |t| t.integer "minisection_id" t.integer "question_id" end I am trying to find all question id''s with a specific minisection_id eg (params[:minisection_id]) @question_list = ??? ANy guidance would be helpful as I really am having trouble figuring this out. Thanks Dave -- Posted via http://www.ruby-forum.com/. -- 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/513c24195c2f024833fc060312e55fd4%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
could you do something like Minisection.find(params[:minisection_id]).questions @question_list = Minisection.find(params[:minisection_id]).questions On Thu, Aug 15, 2013 at 11:53 AM, Dave Castellano <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Hi, > > I created a join table and am having trouble figuring out how to query > it... > > create_table "minisections_questions", :id => false, :force => true do > |t| > t.integer "minisection_id" > t.integer "question_id" > end > > I am trying to find all question id''s with a specific minisection_id eg > (params[:minisection_id]) > > @question_list = ??? > > ANy guidance would be helpful as I really am having trouble figuring > this out. > > Thanks > Dave > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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/513c24195c2f024833fc060312e55fd4%40ruby-forum.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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/CAE%2BzMv8C_hzXXH5GQ%3Dx%3DBtJeJXESeJWSK7GosX70TBC9tTH%2BSw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Dave Castellano wrote in post #1118800:> Hi, > > I created a join table and am having trouble figuring out how to query > it... >Thank you! Dave -- Posted via http://www.ruby-forum.com/. -- 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/b5ca078e9d3074fb3fa293416839952f%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
worked? if so, you''re welcome! On Thu, Aug 15, 2013 at 12:42 PM, Dave Castellano <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Dave Castellano wrote in post #1118800: > > Hi, > > > > I created a join table and am having trouble figuring out how to query > > it... > > > > > Thank you! > > Dave > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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/b5ca078e9d3074fb3fa293416839952f%40ruby-forum.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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/CAE%2BzMv93ANU9uYHW8Y%2BV_H_Un-iw5EFYzgaV7oSZMM%3D%3D%2B4w8iA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
John Davalos wrote in post #1118812:> worked? if so, you''re welcome!Yep! Worked well, and helped me understand the concept. so thanks... -- Posted via http://www.ruby-forum.com/. -- 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/9be4afc5a004fe8df9c9e73b4836bf77%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
awesome! no problem. On Thu, Aug 15, 2013 at 6:29 PM, Dave Castellano <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> John Davalos wrote in post #1118812: > > worked? if so, you''re welcome! > > Yep! Worked well, and helped me understand the concept. so thanks... > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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/9be4afc5a004fe8df9c9e73b4836bf77%40ruby-forum.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- 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/CAE%2BzMv-YtwAAc2TCuQgtNG40ztCSeXZf4Afa-QnUvg0tHqEQwQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.