Class: AvatarsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- AvatarsController
- Defined in:
- app/controllers/avatars_controller.rb
Instance Method Summary collapse
Instance Method Details
#crop ⇒ Object
20 21 |
# File 'app/controllers/avatars_controller.rb', line 20 def crop end |
#show ⇒ Object
4 5 |
# File 'app/controllers/avatars_controller.rb', line 4 def show end |
#update ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/avatars_controller.rb', line 7 def update if @user.update_attributes(params[:user]) if params[:user][:avatar].blank? redirect_to avatar_url else redirect_to crop_avatar_url end else flash.now.alert = "Invalid image format" render :show end end |