I have this form:
<%= form_for @account, :as => :account, :url => current_account_path, :html => { :class => 'block' } do |f| %>
<%= f.text_field :name %>
<%= f.submit 'Update', :class => 'button' %>
<% end %>
which is being loaded from users#edit
However, I want it to submit to accounts#update. But, no matter what I do it always submits to users#update. Am I not specifying it correctly?
You’re specifying the URL you want to submit to with the
:urlkey in your hash: if that isn’t the correct route, you should specify it there. So runrake routes, find the right URL in that list, and then put the correct path helper in there and it should work.