title: Understanding `respond_with` in Rails
body: <p>I have a model with <code>before_create</code> and <code>before_update</code> callbacks that can <code>return false</code>. The model is NOT saved when the callbacks fail (as expected), however my controller redirects to the index path on the model not being created (as opposed to rendering the new template). My code is:</p>
  
  <pre><code>class Person
    before_create :reversify
    before_update :reversify
  
    def reversify
      return false if self.name.blank?
      self.name = self.name.reverse
    end
  end
  
  class PeopleController &lt; ApplicationController
  
    respond_to :html
  
    def new
      @person = Person.new
      respond_with(@person)
    end
  
    def create
      @person = Person.create(params[:person])
      respond_with(@person)
    end
  
  end
  </code></pre>