app/controllers/your_data_controller.rb
def update_profile
    @current_user.password_confirmation = @current_user.password
    if @current_user.update_attributes(:name => params[:user][:name], :email => params[:user][:email])
      flash[:notice] = 'Profile has been successfully updated'
      redirect_to :action => 'index'
    else
      @user = @current_user
      render :action => 'edit_profile'
    end
  end
#
# Updates user's details.
#

Updates user's details.
Updates user ' s details .
def update_profile
    @current_user.password_confirmation = @current_user.password
    if @current_user.update_attributes(:name => params[:user][:name], :email => params[:user][:email])
      flash[:notice] = 'Profile has been successfully updated'
      redirect_to :action => 'index'
    else
      @user = @current_user
      render :action => 'edit_profile'
    end
  end
def update_profile @current_user . password_confirmation = @current_user . password if @current_user . update_attributes ( :name => params [ :user ] [ :name ] , :email => params [ :user ] [ :email ] ) flash [ :notice ] = 'Profile has been successfully updated' redirect_to :action => 'index' else @user = @current_user render :action => 'edit_profile' end end
Updates user's details.
Updates user ' s details .