Have the following form:
<%= simple_form_for @user, :as => :user, :action =>
"edit_notification" do |f| -%>
<%= f.input :email %>
<%= f.input :email_alerts %>
<%= f.input :email_summarize %>
<%= f.input :email_newsletter %>
<%= f.input :email_announcements %>
<%= f.button :submit %>
<% end %>
It should trigger the edit_notification action ? But it triggers the
standard edit action. Do i have to add more routes then:
resources :users to get it to trigger ?
This is driving me mad at the time.
Have the following form:
<%= simple_form_for @user, :as => :user, :action =>
"edit_notification" do |f| -%>
<%= f.input :email %>
<%= f.input :email_alerts %>
<%= f.input :email_summarize %>
<%= f.input :email_newsletter %>
<%= f.input :email_announcements %>
<%= f.button :submit %>
<% end %>
It should trigger the edit_notification action ? But it triggers the
standard edit action. Do i have to add more routes then:
resources :users to get it to trigger ?
To override the default URL that a form posts to, you need to say something along the lines of :url => {:action => 'blah', :id => @user.id}
You don't have to create a route for it, but it's generally neater to do so
Fred