Sha256: f802695992321f5b3e92d618b1356a7dd0a57055d2cbe720092c747f2f5c486a
Contents?: true
Size: 519 Bytes
Versions: 14
Compression:
Stored size: 519 Bytes
Contents
class TogMigrationGenerator < Rails::Generator::NamedBase def manifest record do |m| m.migration_template 'migration.rb', 'db/migrate', :assigns => get_local_assigns end end private def get_local_assigns returning(assigns = {}) do if class_name.underscore =~ /^integrate_(.*)_(?:version)(.*)_(?:from)(.*)/ assigns[:plugins] = [{:name => $1, :to_version => $2, :from_version => $3 }] else assigns[:plugins] = [] end end end end
Version data entries
14 entries across 14 versions & 4 rubygems