Class: Morpho::ActivationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/morpho/activations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

#showObject



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