lib/fishplate/tasks.rake in fishplate-1.1.1 vs lib/fishplate/tasks.rake in fishplate-1.1.2
- old
+ new
@@ -10,11 +10,11 @@
require "irb"
ARGV.clear
IRB.start
end
-desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
namespace :generate do
+ desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]"
task :migration, [:name] do |name, args|
klass = args[:name].tr('-', '_').camelize
number = ActiveRecord::Migration.next_migration_number(0)
file_name = "#{number}_#{klass.underscore}.rb"
relative_file_path = File.join("db/migrate", file_name)