Class AccountController
In: app/controllers/account_controller.rb
Parent: ApplicationController

Methods

edit   show   update  

Public Instance methods

Allow user to update their account information

[Source]

    # File app/controllers/account_controller.rb, line 9
 9:   def edit
10:     respond_to do |format|
11:       format.html # index.html.erb
12:       format.xml  #{ render :xml => @user }
13:     end    
14:   end

[Source]

    # File app/controllers/account_controller.rb, line 30
30:   def show
31:     respond_to do |format|
32:       format.html # index.html.erb
33:       format.xml  #{ render :xml => @user }
34:     end    
35:   end

[Source]

    # File app/controllers/account_controller.rb, line 16
16:   def update
17:     respond_to do |format|
18:       
19:       if request.put? and not @user.nil? and @user.update_attributes(params[:user]) and @user.save
20:         flash.now[:notice] = 'Your account has been updated.'
21:         format.html { render :action => 'show' }
22:       else
23:         flash.now[:notice] = "Your account was not successfully updated."
24:         format.html { render :action => "edit" }
25:         format.xml  { render :xml => @user.errors, :status => :unprocessable_entity }
26:       end
27:     end
28:   end

[Validate]