Class: ActiveAuthentication::MagicLinksController

Inherits:
ActiveAuthenticationController show all
Defined in:
app/controllers/active_authentication/magic_links_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
# File 'app/controllers/active_authentication/magic_links_controller.rb', line 8

def create
  @user = User.find_by email: params[:email]
  @user&.send_magic_link

  redirect_to root_path, notice: t(".success")
end

#newObject



5
6
# File 'app/controllers/active_authentication/magic_links_controller.rb', line 5

def new
end

#showObject



15
16
17
18
19
# File 'app/controllers/active_authentication/magic_links_controller.rb', line 15

def show
   @user

  redirect_to root_url, notice: t(".success")
end