So instead of
----------------------------------------
   respond_to do |format|
      if @user.update_attributes(params[:user])
        flash[:notice] = 'User was successfully updated.'
        format.html { redirect_to(:action => 'edit') }
      else
        flash[:error] = 'User was not updated.'
        format.html { render :action => "edit" }
      end
    end
----------------------------------------
Should I do this?
----------------------------------------
      if @user.update_attributes(params[:user])
        flash[:notice] = 'User was successfully updated.'
        format.html { redirect_to(:action => 'edit') }
      else
        flash[:error] = 'User was not updated.'
        format.html { render :action => "edit" }
      end
----------------------------------------

I had the respond_to block because that's how it was programmed by the 
scaffold and wasn't sure if I should remove it or not.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to