Class: BlueLightSpecial::UsersController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- BlueLightSpecial::UsersController
- Defined in:
- app/controllers/blue_light_special/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/blue_light_special/users_controller.rb', line 18 def create @user = ::User.new params[:user] if @user.save sign_in(@user) redirect_to(url_after_create) else render :template => 'users/new' end end |
#edit ⇒ Object
28 29 30 31 |
# File 'app/controllers/blue_light_special/users_controller.rb', line 28 def edit @user = current_user render :template => 'users/edit' end |
#new ⇒ Object
13 14 15 16 |
# File 'app/controllers/blue_light_special/users_controller.rb', line 13 def new @user = ::User.new(params[:user]) render :template => 'users/new' end |
#show ⇒ Object
8 9 10 11 |
# File 'app/controllers/blue_light_special/users_controller.rb', line 8 def show @user = current_user render :template => 'users/show' end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/blue_light_special/users_controller.rb', line 33 def update @user = current_user if @user.update_attributes(params[:user]) flash[:success] = 'Your profile has been updated.' redirect_to user_path(@user) else render :template => 'users/edit' end end |