Skip to content

Commit

Permalink
can specify FooMigration as well as foo_migration
Browse files Browse the repository at this point in the history
previously, if you did this:

    rake db:new_migration name=foo_migration

your migration's class name was FooMigration, but if you did this:

    rake db:new_migration name=FooMigration

your migration's class name was Foomigration. simple fix.
  • Loading branch information
gilesbowkett committed Feb 19, 2012
1 parent 6e3fad0 commit 6ce1bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/standalone_migrations.rb
Expand Up @@ -99,6 +99,6 @@ def file_name migration
end

def class_name str
str.split('_').map { |s| s.capitalize }.join
str.underscore.split('_').map { |s| s.capitalize }.join
end
end

0 comments on commit 6ce1bd8

Please sign in to comment.