select list from polymorphic tables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

select list from polymorphic tables

fugee ohu
I have clubs and festivals polymorphed as venues Now I wanna create a dropdown list in my form Not  only will I have to pass the venue_id but also the venue_type How am  I gonna do this?

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d28f1805-13f7-4f6c-93bd-ff5f71f04a4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: select list from polymorphic tables

Hassan Schroeder-2
On Sat, Jun 3, 2017 at 10:02 PM, fugee ohu <[hidden email]> wrote:
> I have clubs and festivals polymorphed as venues Now I wanna create a
> dropdown list in my form Not  only will I have to pass the venue_id but also
> the venue_type How am  I gonna do this?

See:  ActionView::Helpers::FormOptionsHelper.collection_select()

--
Hassan Schroeder ------------------------ [hidden email]
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yBA_bpZNOkuu3GGczBvk%3DO2S_uUgkyTm5geRHiiqdegLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.