I’m having a similar issue. Any one have any ideas?

You haven’t set an instance variable named @user.

Try this instead:

def update

@user = User.find_by_id(session[:user_id])

@user.attributes = params[:user]

flash[:message] = "User was successfully updated" and redirect_to :action => :index and return if

#If we didn't return, we couldn't save, so execute this alternate flash and render

flash[:message] = "Unable to save changes"

render :action => :edit


Alternatively, you could gang this action into the edit action with if