Class: Ballot::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Ballot::Generators::InstallGenerator
- Extended by:
- Ballot::Generators
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/ballot/install/install_generator.rb
Overview
The Rails generator to install the ballot_votes table.
Instance Attribute Summary
Attributes included from Ballot::Generators
Attributes inherited from Rails::Generators::Base
Instance Method Summary collapse
-
#create_migration_file ⇒ Object
:nodoc:.
Methods included from Ballot::Generators
next_migration_number, orm_has_migration?, source_root
Methods inherited from Rails::Generators::Base
desc, generator_name, #migration_template
Instance Method Details
#create_migration_file ⇒ Object
:nodoc:
18 19 20 21 22 23 24 |
# File 'lib/generators/ballot/install/install_generator.rb', line 18 def create_migration_file #:nodoc: if self.class.orm_has_migration? migration_template 'migration.rb', 'db/migrate/install_ballot_vote_migration.rb' else warn "Unsupported ORM #{self.class.orm}" end end |