Sha256: f838bea30a7f9a6f714d7b2e8cca58eef3ddce392b848052fca64124c2a0baad

Contents?: true

Size: 434 Bytes

Versions: 2

Compression:

Stored size: 434 Bytes

Contents

require 'rails/generators/migration'

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

  source_root File.expand_path('../templates', __FILE__)
  
  def self.next_migration_number(dirname)
    Time.now.strftime("%Y%m%d%H%M%S")
  end
  
  def create_migration
    migration_template "#{self.class.source_root}/migration.rb", File.join('db/migrate', "add_translations.rb")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
teonimesic-translated_attributes-0.5.8 lib/generators/translated_attributes/translated_attributes_generator.rb
teonimesic-translated_attributes-0.5.7 lib/generators/translated_attributes/translated_attributes_generator.rb