Class: ImmosquareActiveRecordChangeTracker::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ImmosquareActiveRecordChangeTracker::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/immosquare-active-record-change-tracker/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
18 19 20 |
# File 'lib/generators/immosquare-active-record-change-tracker/install/install_generator.rb', line 18 def self.next_migration_number(dirname) Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#copy_migration ⇒ Object
14 15 16 |
# File 'lib/generators/immosquare-active-record-change-tracker/install/install_generator.rb', line 14 def copy_migration migration_template("template_1.rb", "db/migrate/#{migration_name.underscore}.rb", :migration_version => migration_version) end |