Class: Morpho::UnlocksController

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

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/morpho/unlocks_controller.rb', line 6

def create
  if user && user.
    user.resend_unlock_token_email!
    flash.now[:notice] = I18n.t('morpho.messages.unlocks.unlock.success')
    render :new
  else
    flash.now[:error] = I18n.t('morpho.messages.unlocks.unlock.failure')
    render :new
  end
end

#showObject



17
18
19
20
21
22
23
24
# File 'app/controllers/morpho/unlocks_controller.rb', line 17

def show
  if user && user.
    user.
    redirect_to , success: I18n.t('morpho.messages.unlocks.unlock.success')
  else
    redirect_to , error: I18n.t('morpho.messages.unlocks.unlock.failure')
  end
end