title: How to render edit view and post flash message in rails3
body: <p>In my account controller I'd like to display (render, redirect_to ?) the edit view after changes get saved and display flash notice. </p>
  
  <pre><code> def update
      @account = Account.find(params[:id])
  
      respond_to do |format|
        if @account.update_attributes(params[:account])
          format.html { redirect_to(@account, :notice =&gt; 'Account was successfully updated.') }
  
        else
          format.html { render :action =&gt; "edit" }
        end
      end
    end
  </code></pre>