Class: NavvyGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- NavvyGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/navvy_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
13 14 15 |
# File 'lib/generators/navvy_generator.rb', line 13 def self.source_root File.join(File.dirname(__FILE__), '..', '..', 'generators', 'navvy', 'templates') end |
Instance Method Details
#install_navvy ⇒ Object
17 18 19 20 21 22 |
# File 'lib/generators/navvy_generator.rb', line 17 def install_navvy migration_template( "#{orm}_migration.rb", 'db/migrate/create_jobs.rb' ) end |
#orm ⇒ Object
24 25 26 |
# File 'lib/generators/navvy_generator.rb', line 24 def orm [:sequel] ? 'sequel' : 'active_record' end |