Sha256: 3ac3f9c8fa9f8e4c890522d1d0c4282750cad821a852bad3028be3a838293e88

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 Bytes

Contents

require 'generators/cms/content_types'

module CMS
  module Generators

    class MigrationGenerator < ContentTypes
      source_root File.expand_path('../templates', __FILE__)

      def create_migration_file
        if options[:only].present?
          migration_template 'migration.rb', "db/migrate/create_#{options[:only].underscore.pluralize}"
        else
          @migration_types = CMS::Configuration.scoped_types(options)
          migration_template 'migration.rb', 'db/migrate/create_cms'
        end
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
honey-cms-0.4.5 lib/generators/cms/migration_generator.rb
honey-cms-0.4.2 lib/generators/cms/migration_generator.rb
honey-cms-0.4.1 lib/generators/cms/migration_generator.rb
honey-cms-0.4.0 lib/generators/cms/migration_generator.rb