Sha256: 5fbcca1f4c4c7e70958c839e1314a81cb7440755e3ade9c47e2b9b7c2e3042cc

Contents?: true

Size: 552 Bytes

Versions: 117

Compression:

Stored size: 552 Bytes

Contents

require 'rails/generators'
require 'rails/generators/active_record'

module RocketCms
  class MigrationGenerator < Rails::Generators::Base
    include ActiveRecord::Generators::Migration
    source_root File.expand_path('../templates', __FILE__)

    desc 'RocketCMS migration generator'
    def install
      if RocketCMS.active_record?
        %w(contact_messages news pages seos).each do |table_name|
          migration_template "migration_#{table_name}.rb", "db/migrate/rocket_cms_create_#{table_name}.rb"
        end
      end
    end
  end
end

Version data entries

117 entries across 117 versions & 2 rubygems

Version Path
rocket_cms-0.8.10 lib/generators/rocket_cms/migration_generator.rb
ack_rocket_cms-0.8.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.9 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.8 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.7 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.6 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.5 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.4 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.3 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.6 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.5 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.4 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.3 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.2 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.8.0.pre.1 lib/generators/rocket_cms/migration_generator.rb