Module: DeviseOtpAuthenticatable::Controllers::UrlHelpers

Defined in:
lib/devise_otp_authenticatable/controllers/url_helpers.rb

Instance Method Summary collapse

Instance Method Details

#edit_otp_token_path_for(resource_or_scope, opts = {}) ⇒ Object



24
25
26
27
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 24

def edit_otp_token_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("edit_#{scope}_otp_token_path", opts)
end

#otp_credential_path_for(resource_or_scope, opts = {}) ⇒ Object



34
35
36
37
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 34

def otp_credential_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("#{scope}_otp_credential_path", opts)
end

#otp_token_path_for(resource_or_scope, opts = {}) ⇒ Object



19
20
21
22
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 19

def otp_token_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("#{scope}_otp_token_path", opts)
end

#persistence_otp_token_path_for(resource_or_scope, opts = {}) ⇒ Object



14
15
16
17
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 14

def persistence_otp_token_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("persistence_#{scope}_otp_token_path", opts)
end

#recovery_otp_token_for(resource_or_scope, opts = {}) ⇒ Object



4
5
6
7
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 4

def recovery_otp_token_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("recovery_#{scope}_otp_token_path", opts)
end

#refresh_otp_credential_path_for(resource_or_scope, opts = {}) ⇒ Object



9
10
11
12
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 9

def refresh_otp_credential_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("refresh_#{scope}_otp_credential_path", opts)
end

#reset_otp_token_path_for(resource_or_scope, opts = {}) ⇒ Object



29
30
31
32
# File 'lib/devise_otp_authenticatable/controllers/url_helpers.rb', line 29

def reset_otp_token_path_for(resource_or_scope, opts = {})
  scope = ::Devise::Mapping.find_scope!(resource_or_scope)
  send("reset_#{scope}_otp_token_path", opts)
end