Class: ProfilesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



4
5
6
# File 'app/controllers/profiles_controller.rb', line 4

def edit
  @user = current_user
end

#updateObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/profiles_controller.rb', line 8

def update
  @user = current_user
  if @user.update_attributes(params[:user])
    flash[:notice] = "Your user account has been updated."
    redirect_to edit_profile_url
  else
    render :action => :edit
  end
end