Sha256: 4ec82ad1f58dca83f6f2a84708d21089409d3aa9971f2ba850d16563f81d892e

Contents?: true

Size: 585 Bytes

Versions: 6

Compression:

Stored size: 585 Bytes

Contents

require 'rails/generators'
require 'rails/generators/migration'

class ActsAsTaggableMigrationGenerator < Rails::Generators::Base 
  include Rails::Generators::Migration

  def self.source_root
     @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
  end

  def self.next_migration_number(dirname)
     Time.now.strftime("%Y%m%d%H%M%S")
  end

  def create_migration
     migration_template "migration.rb", File.join("db/migrate", "#{file_name}.rb")
  end

  protected

  def file_name
    "acts_as_taggable_migration"
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
protolif-acts_as_taggable_on_steroids-2.1.2 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb
protolif-acts_as_taggable_on_steroids-2.1.1 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb
bborn-acts_as_taggable_on_steroids-2.1 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb
bborn-acts_as_taggable_on_steroids-2.0.beta3 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb
bborn-acts_as_taggable_on_steroids-2.0.beta2 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb
acts_as_taggable3-2.0.beta2 lib/generators/acts_as_taggable_migration/acts_as_taggable_migration_generator.rb