Say that there are two buttons in the index view of my model which is used to create a new instance of the model. I want to pass the variable Do it instead and then in your Controller : number for my controller and use it in the
new function so that I depend on how the button was pressed, its On the basis I can change a bit. How can I access
: number in the controller?
& lt;% = link_to 'New Run1', new_test_suite_run_path ,: class = & gt; "BTN BTN-Custom 1" ,: number = & gt; 1%> & Lt;% = link_to 'New Run 2', new_test_suite_run_path ,: class = & gt; "BTN BTN-Custom 1" ,: number = & gt; 2% & gt;
& lt; % = Link_to 'New Run1', new_test_suite_run_path (: number = gt; 1) ,: class = & gt; "BTN BTN-Custom 1"%>
my_number = params [: number]
Comments
Post a Comment