Class: UsersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- UsersController
- Defined in:
- app/controllers/users_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#login_button, #redirect_to_main_organization!, #should_choose_organization?, #should_redirect_to_main_organization?, #validate_accessible!, #validate_used_here!
Methods included from Mumuki::Laboratory::Controllers::DynamicErrors
#forbidden, #gone, #internal_server_error, #not_found, #unauthorized
Methods included from Mumuki::Laboratory::Controllers::Messages
#has_messages?, #messages_count
Methods included from Mumuki::Laboratory::Controllers::Authorization
#authorization_slug, #authorize_if_private!, #from_sessions?
Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization
#organization_name, #set_current_organization!, #visit_organization!
Instance Method Details
#show ⇒ Object
5 6 7 |
# File 'app/controllers/users_controller.rb', line 5 def show @messages = current_user. || [] end |
#unsubscribe ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/users_controller.rb', line 14 def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end |
#update ⇒ Object
9 10 11 12 |
# File 'app/controllers/users_controller.rb', line 9 def update current_user.update_and_notify! user_params redirect_to root_path, notice: I18n.t(:user_data_updated) end |