class GeoserverMigrations::Generators::AddGenerator
Public Instance Methods
add_migration()
click to toggle source
# File lib/generators/geoserver_migrations/add/add_generator.rb, line 8 def add_migration migration_name = file_name.underscore class_name = file_name.camelize create_file File.join(Rails.root, GeoserverMigrations.migrations_rootpath, "#{Time.now.strftime('%Y%m%d%H%M%S')}_#{migration_name}.rb"), <<-MIGRATION_FILE class #{class_name} < GeoserverMigrations::Migration def run # add migration code here end end MIGRATION_FILE end