Tuesday, 22 May 2012

select_tag triggers another action in controller?

A form can be submitted by pressing the Submit button or select an item in the select_tag: <% form_tag url_for(:action => 'create') do %> <%= select_tag :names, options_from_collection_for_select(@name_list, :id, :name, @name), { :onchange => "this.form.submit();" } %> <%= submit_tag 'Submit' %> <% end %> Is it possible to invoke another controller action (other than create) in

No comments:

Post a Comment