Class: AccessAllow::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AccessAllow::Generators::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/access_allow/install_generator.rb
Overview
The Install generator ‘access_allow:install`
Instance Method Summary collapse
Instance Method Details
#copy_tasks ⇒ Object
16 17 18 19 |
# File 'lib/generators/access_allow/install_generator.rb', line 16 def copy_tasks template "templates/access_allow.rb", "config/initializers/access_allow.rb" migration_template "templates/migration.rb.erb", "db/migrate/access_allow_create_permissions.rb", migration_version: migration_version end |
#migration_version ⇒ Object
21 22 23 |
# File 'lib/generators/access_allow/install_generator.rb', line 21 def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end |