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.37.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.37.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.36.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.35.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.34.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.33.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.33.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.32.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.31.1 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.31.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.30.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.29.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.28.0 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.8 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.7 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.6 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.5 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.4 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.3 lib/generators/rocket_cms/migration_generator.rb
rocket_cms-0.27.2 lib/generators/rocket_cms/migration_generator.rb