Sha256: 74d5e04319273c99ddba03170ac7b29d65003fb700e2b50f0367df48505cb459

Contents?: true

Size: 547 Bytes

Versions: 6

Compression:

Stored size: 547 Bytes

Contents

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

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

    desc 'Enjoy Gallery migration generator'
    def migration
      if Enjoy.active_record?
        %w(gallery).each do |table_name|
          migration_template "migration_#{table_name}.rb", "db/migrate/enjoy_gallery_create_#{table_name}.rb"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enjoy_cms_gallery-0.4.1 lib/generators/enjoy/gallery/migrations/migration_generator.rb
enjoy_cms_gallery-0.4.0.2 lib/generators/enjoy/gallery/migrations/migration_generator.rb
enjoy_cms_gallery-0.4.0.1 lib/generators/enjoy/gallery/migrations/migration_generator.rb
enjoy_cms_gallery-0.4.0 lib/generators/enjoy/gallery/migrations/migration_generator.rb
enjoy_cms_gallery-0.4.0.beta3 lib/generators/enjoy/gallery/migrations/migration_generator.rb
enjoy_cms_gallery-0.4.0.beta1 lib/generators/enjoy/gallery/migrations/migration_generator.rb