Class: TwoFactorAuthenticatable::Generators::TwoFactorAuthenticationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/two_factor_authentication/two_factor_authentication_generator.rb

Instance Method Summary collapse

Instance Method Details

#inject_two_factor_authentication_contentObject



8
9
10
11
# File 'lib/generators/two_factor_authentication/two_factor_authentication_generator.rb', line 8

def inject_two_factor_authentication_content
  path = File.join("app", "models", "#{file_path}.rb")
  inject_into_file(path, "two_factor_authenticatable, :", :after => "devise :") if File.exists?(path)
end