title: Form_for error - no route matches post
body: <p>I'm attempting to update my profile's settings using checkboxes in a settings page. Once the checkbox is clicked I want to redirect to the settings page, so I added a new action to my controller that updates the profile but redirects to the settings. However, I'm getting the following error:</p>
  
  <pre><code>`No route matches {:action=&gt;"edit_settings", :controller=&gt;"profiles"}`
  </code></pre>
  
  <p>Here's my <code>form_for</code> code:</p>
  
  <pre><code>&lt;%= form_tag({:action =&gt; "edit_settings", :controller =&gt; "profiles"}, :html =&gt; {:multipart =&gt; true }) do |f| %&gt;
  </code></pre>
  
  <p>My <code>edit_settings</code> action in my <code>profiles</code> controller:</p>
  
  <pre><code>def edit_settings
    @profile = user.profile
    if @profile.update_attributes(params[:profile])
      redirect_to settings_path, :notice =&gt; 'Updated user information successfully.'
    else
      render :edit
    end
  end
  </code></pre>
  
  <p>Inside my <code>routes.rb</code> file:</p>
  
  <pre><code>resources :profiles do
    post :edit_settings
  end
  </code></pre>
  
  <p>Inside <code>rake routes</code>:</p>
  
  <pre><code>profile_edit_settings  POST  /profiles/:profile_id/edit_settings(.:format)        {:action=&gt;"edit_settings", :controller=&gt;"profiles"}
  </code></pre>