Class: Nopassword::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Nopassword::InstallGenerator
- Defined in:
- lib/generators/nopassword/install/install_generator.rb
Instance Method Summary collapse
- #add_nopassword_routes ⇒ Object
- #copy_controller_file ⇒ Object
- #copy_migration_file ⇒ Object
- #copy_view_files ⇒ Object
Instance Method Details
#add_nopassword_routes ⇒ Object
14 15 16 |
# File 'lib/generators/nopassword/install/install_generator.rb', line 14 def add_nopassword_routes route "resource :email_authentication" end |
#copy_controller_file ⇒ Object
5 6 7 |
# File 'lib/generators/nopassword/install/install_generator.rb', line 5 def copy_controller_file copy_file "controller.rb", "app/controllers/email_authentications_controller.rb" end |
#copy_migration_file ⇒ Object
18 19 20 |
# File 'lib/generators/nopassword/install/install_generator.rb', line 18 def copy_migration_file rake "nopassword_engine:install:migrations" end |
#copy_view_files ⇒ Object
9 10 11 12 |
# File 'lib/generators/nopassword/install/install_generator.rb', line 9 def copy_view_files directory NoPassword.root.join("app/views/nopassword/email_authentication_mailer"), 'app/views/email_authentication_mailer' directory NoPassword.root.join("app/views/nopassword/email_authentications"), 'app/views/email_authentications' end |