Class: DoubleBooked::MigrationsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DoubleBooked::MigrationsGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/double_booked/migrations/migrations_generator.rb
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration. taken from github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
10 11 12 |
# File 'lib/generators/double_booked/migrations/migrations_generator.rb', line 10 def self.next_migration_number(dirname) Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_migrations ⇒ Object
18 19 20 |
# File 'lib/generators/double_booked/migrations/migrations_generator.rb', line 18 def create_migrations migration_template "double_booked.rb.erb", "db/migrate/create_double_booked.rb" end |