Sha256: 48a5a2a5dcd6131514e33246f8cc26ad73517ae9aa8c7342c983aa68f0bd0cbe

Contents?: true

Size: 1015 Bytes

Versions: 6

Compression:

Stored size: 1015 Bytes

Contents

module DeviseTwoFactorable
  module Controllers
    module UrlHelpers
      def recovery_token_for(resource_or_scope, opts = {})
        scope = Devise::Mapping.find_scope!(resource_or_scope)
        send("recovery_#{scope}_token_path", opts)
      end

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

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
devise-2fa-0.4.1 lib/devise_two_factorable/controllers/url_helpers.rb
devise-2fa-0.4.0 lib/devise_two_factorable/controllers/url_helpers.rb
devise-2fa-0.2.1 lib/devise_two_factorable/controllers/url_helpers.rb
devise-2fa-0.2.0 lib/devise_two_factorable/controllers/url_helpers.rb
devise-2fa-0.1.1 lib/devise_two_factorable/controllers/url_helpers.rb
devise-2fa-0.1.0 lib/devise_two_factorable/controllers/url_helpers.rb