diff --git a/lib/generators/two_factor_authentication/two_factor_authentication_generator.rb b/lib/generators/two_factor_authentication/two_factor_authentication_generator.rb index d67dc791..47840d3c 100644 --- a/lib/generators/two_factor_authentication/two_factor_authentication_generator.rb +++ b/lib/generators/two_factor_authentication/two_factor_authentication_generator.rb @@ -7,7 +7,7 @@ class TwoFactorAuthenticationGenerator < Rails::Generators::NamedBase 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) + inject_into_file(path, "two_factor_authenticatable, :", :after => "devise :") if File.exist?(path) end hook_for :orm