Class: DeviseOtp::Generators::DeviseOtpGenerator

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

Instance Method Summary collapse

Instance Method Details

#inject_devise_otp_contentObject



8
9
10
11
# File 'lib/generators/devise_otp/devise_otp_generator.rb', line 8

def inject_devise_otp_content
  path = File.join("app", "models", "#{file_path}.rb")
  inject_into_file(path, "otp_authenticatable, :", after: "devise :") if File.exist?(path)
end