Sha256: 1747338cf35de97653dd4708a5ae56630209c256a89cd3c1af629687c188b873
Contents?: true
Size: 616 Bytes
Versions: 7
Compression:
Stored size: 616 Bytes
Contents
require 'rails/generators' class ExvoGlobalizeGenerator < Rails::Generators::Base desc "Add a 'create_globalize_translations' migration" include Rails::Generators::Migration def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file migration_template 'migration.rb', 'db/migrate/create_globalize_translations.rb' end end
Version data entries
7 entries across 7 versions & 1 rubygems