10
11
12
13
14
15
16
17
|
# File 'lib/trendi18n/generator/commands.rb', line 10
def installer
puts "Creating migration file..."
migration_template(File.join("migrations", "create_translations.rb"), File.join("db", "migrate"),
:migration_file_name => ActiveRecord::Base.pluralize_table_names ? "create_translations" : "create_translation")
puts "Inserting migration into db..."
version = File.get_migration_version_from_file_name(ActiveRecord::Base.pluralize_table_names ? /create_translations\.rb$/ : /create_translation\.rb$/)
system "rake db:migrate:up VERSION=#{version}"
end
|