Class: TwoFactorAuthenticatable::Generators::DeviseMultiFactorGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- TwoFactorAuthenticatable::Generators::DeviseMultiFactorGenerator
- Defined in:
- lib/generators/devise_multi_factor/devise_multi_factor_generator.rb
Instance Method Summary collapse
Instance Method Details
#inject_devise_multi_factor_content ⇒ Object
8 9 10 11 12 |
# File 'lib/generators/devise_multi_factor/devise_multi_factor_generator.rb', line 8 def inject_devise_multi_factor_content path = File.join("app", "models", "#{file_path}.rb") inject_into_file(path, "two_factor_authenticatable, :", :after => "devise :") if File.exists?(path) inject_into_file(path, "totp_enrollable, :", :after => "devise :") if File.exists?(path) end |