Vote count:
0
I'm trying to use collection_select
within a form_tag
to show the record selected from amongst the options. (You can think of it as replacing the list view in index
page with a collection_select
. ) I have a model called Acts, and in the view, I'm using -
form_tag act_path(@act), :method => :get
But how do I extract the :id
from collection_select for passing to the Show controller? And, how do I use it in the form_tag helper? Thanks.
asked 1 min ago
Using collection_select for selecting and showing ActiveRecord
Aucun commentaire:
Enregistrer un commentaire