Class: VoterLoveGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- VoterLoveGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/voter_love/voter_love_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
13 14 15 |
# File 'lib/generators/voter_love/voter_love_generator.rb', line 13 def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end |
.source_root ⇒ Object
9 10 11 |
# File 'lib/generators/voter_love/voter_love_generator.rb', line 9 def self.source_root @source_root ||= File.dirname(__FILE__) + '/templates' end |
Instance Method Details
#generate_migration ⇒ Object
17 18 19 |
# File 'lib/generators/voter_love/voter_love_generator.rb', line 17 def generate_migration migration_template 'migration.rb', 'db/migrate/create_voter_love_tables' end |