Sha256: 6111e582470ca0275c87068bab40928af7b9ed0fae2489380eb278b76cd16498
Contents?: true
Size: 685 Bytes
Versions: 1
Compression:
Stored size: 685 Bytes
Contents
module ActionDispatch::Routing class Mapper protected def devise_two_factor_authentication(mapping, controllers) resource :two_factor_authentication, :only => [:show, :update, :resend_code], :path => mapping.path_names[:two_factor_authentication], :controller => controllers[:two_factor_authentication] do collection { get resend_code_path(mapping), as: "resend_code" } end end def resend_code_path(mapping) Devise.mappings[resource_name(mapping)].path_names[:two_factor_authentication_resend_code] || "resend_code" end def resource_name(mapping) mapping.class_name.underscore.to_sym end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise_two_factor_authentication-3.0.0 | lib/devise_two_factor_authentication/routes.rb |