Class: Nopassword::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/nopassword/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_nopassword_routesObject



14
15
16
# File 'lib/generators/nopassword/install/install_generator.rb', line 14

def add_nopassword_routes
  route "resource :email_authentication"
end

#copy_controller_fileObject



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_fileObject



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_filesObject



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