lib/fishplate/tasks.rake in fishplate-0.2.2 vs lib/fishplate/tasks.rake in fishplate-0.3.0

- old
+ new

@@ -21,10 +21,10 @@ task "db:setup" => ["fail_if_prod", "db:create", "db:schema:load"] desc "Generate new migration with name given, example: rake generate:migration[CreateUsers]" namespace :generate do task :migration, [:name] do |name, args| - klass = args[:name].gsub('-','_').camelize + klass = args[:name].tr('-', '_').camelize number = ActiveRecord::Migration.next_migration_number(0) file_name = "#{number}_#{klass.underscore}.rb" file_path = A9n.root.join("db/migrate", file_name) content = <<-CONTENT |class #{klass} < ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]