lib/generators/scrivito/install/install_generator.rb in scrivito_sdk-0.30.0.rc1 vs lib/generators/scrivito/install/install_generator.rb in scrivito_sdk-0.30.0
- old
+ new
@@ -4,12 +4,11 @@
include ::Rails::Generators::Migration
source_root File.expand_path('../templates', __FILE__)
def self.next_migration_number(dirname)
- migration_number = current_migration_number(dirname) + 1
- [Time.now.utc.strftime('%Y%m%d%H%M%S'), '%.14d' % migration_number].max
+ Scrivito::Migration.next_migration_number(current_migration_number(dirname))
end
def copy_initializer
copy_file 'config/initializers/scrivito.rb'
end
@@ -22,11 +21,11 @@
def copy_cms_controller
copy_file 'app/controllers/cms_controller.rb'
end
def copy_migration
- destination_path = File.join(Scrivito::Configuration.migration_path, 'install_scrivito.rb')
- migration_template 'scrivito/migrate/install_scrivito.rb', destination_path
+ migration_template 'scrivito/migrate/install_scrivito_migration.rb',
+ File.join(Scrivito::Configuration.migration_path, 'install_scrivito_migration.rb')
end
def copy_page_resources
copy_file 'app/models/page.rb'
copy_file 'app/controllers/page_controller.rb'