title: How to assign custom function to formtastic action?
body: <p>My form:</p>
  
  <pre><code>&lt;%= semantic_form_for(@campaign) do |f| %&gt;
  ...
    &lt;%= f.actions do %&gt;
      &lt;%= f.action :submit, label: "Save"%&gt;
      &lt;%= f.action :submit, label: "Save &amp; New" %&gt;
      &lt;%= f.action :cancel, label: "Cancel"%&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Function in campaign_controller.rb:</p>
  
  <pre><code>  def save_and_new
      print 'SAVE_AND_NEW'
      @campaign = Campaign.find(params[:id])
  
      respond_to do |format|
        if @campaign.update_attributes(params[:campaign])
          format.html { redirect_to new_campaign_path, notice: 'Campaign was successfully usaved.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit" }
          format.json { render json: @campaign.errors, status: :unprocessable_entity }
        end
      end
    end
  </code></pre>
  
  <p>Routes.rb:</p>
  
  <pre><code>  resources :campaigns do 
      member do
        post 'save_and_new'
      end
    end
  </code></pre>
  
  <p>Route, according to the function:</p>
  
  <pre><code>save_and_new_campaign POST   /campaigns/:id/save_and_new(.:format) campaigns#save_and_new
  </code></pre>
  
  <p>And the only thing, that I don't understand, is what to write in action to call the function.</p>