Forum: Ruby on Rails editing users with restful_authentication

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Neal L (Guest)
on 2009-01-29 23:45
(Received via mailing list)
Hi all,

I'm using the wonderful restful_authentication plugin and would like
to allow users to update their profiles.  The problem is that when the
update method is called, it seems to log out the current user
(current_user becomes nil).

Any ideas?

From the Users controller:

  def update
    @user = current_user.client.users.find(params[:id])
    params[:user][:login] = @user.login

    respond_to do |format|
      if @user.update_attributes(params[:user])
        flash[:notice] = 'User details were successfully updated.'
        format.html { redirect_to client_path(current_user.client) }
        format.xml  { head :ok }
        format.html { render :action => "edit" }
        format.xml  { render :xml => @user.errors, :status
=> :unprocessable_entity }

Neal L (Guest)
on 2009-01-29 23:51
(Received via mailing list)
n/m this post... problem was unrelated...
This topic is locked and can not be replied to.