Sha256: 3b6e2488a09d5c8b525c279f7b1ee9af4a90ef28ed99d7fb5043d795080e9aea

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

class NoPassword::InstallGenerator < Rails::Generators::Base
  source_root File.expand_path("templates", __dir__)

  def copy_controller_file
    copy_file "controller.rb", "app/controllers/email_authentications_controller.rb"
  end

  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

  def add_nopassword_routes
    route "resource :email_authentication"
  end

  def copy_migration_file
    rake "nopassword_engine:install:migrations"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nopassword-0.1.0 lib/generators/nopassword/install/install_generator.rb