class ActsAsHuman::Generators::Migration
Public Class Methods
source_root()
click to toggle source
# File lib/acts_as_human/generators/migration.rb, line 10 def self.source_root File.dirname(__FILE__) + '/migration' end
Public Instance Methods
copy_migration()
click to toggle source
# File lib/acts_as_human/generators/migration.rb, line 14 def copy_migration time = ActiveRecord::Migration.next_migration_number(1) file = "db/migrate/#{time}_add_names_to_#{table_name}.rb" template("migration.rb", file) puts 'Migration created' end