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.27.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.26.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.26.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.25.5 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.25.4 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.25.3 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.25.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.25.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.24.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.22.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.21.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.21.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.20.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.20.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.19.8 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.19.7 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.19.6 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.19.4 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.19.3 lib/generators/rocket_cms/migration_generator.rb