I am creating a rail app and showing the pages of each example of my class to appear in the drop Want to link to the index page down. I am currently using a select_tag with options_from_collection_for_select, but it does not enter the corresponding ID: related to navigating on the Show page.
Is there a way to get it without using javascript? Any suggestions greatly appreciated!
If you want to submit the form to selected
You must use javascript
and the code below
<% form_tag: url = & gt; {: Controller = & gt; "My_controller" ,: Action => "Show",: id = & gt; ID} ,: method = & gt; : Get% & gt; & Lt;% = select_tag: id, options_from_collection_for_select (@ myObjects ,: id ,: name)% & gt; & Lt;% = submit_tag 'Show'% & gt; & Lt;% end% & gt;
No comments:
Post a Comment