Class: Morpho::ActivationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Morpho::ActivationsController
- Defined in:
- app/controllers/morpho/activations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/morpho/activations_controller.rb', line 6 def create if user && !user.active? user.resend_activation_needed_email! flash.now[:notice] = I18n.t('morpho.messages.activations.create.success') render :new else flash.now[:error] = I18n.t('morpho.messages.activations.create.failure') render :new end end |
#show ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/controllers/morpho/activations_controller.rb', line 17 def show if user && !user.active? user.activate! render "morpho/activations/success" else render "morpho/activations/failure" end end |