title: Rails Newbie: Recommendations for error handling in controller
body: <p>Sorry if the question is obvious, I am only starting to work with Rails.<br>
  I have a following code in several controller methods now:</p>
  
  <pre><code>respond_to do |format|
      if @project.save
          format.html { redirect_to(edit_project_url(@project), :notice =&gt; '#{user.name} added to #{role}.') }
          format.js
      else
          format.html { render :action =&gt; "edit" }
          format.js #...
      end
  end
  </code></pre>
  
  <p>So the question is, what is the best way to do the same thing for errors in all methods?<br>
  Is it recommended that I use <code>save!</code> and handle it in <code>rescue_action</code>?</p>
  
  <p>Or should I do my own <code>respond</code> method and pass <code>save</code> in a block?</p>