closure_tree
closure_tree copied to clipboard
closure_tree:migration yields non plural class name
rails g closure_tree:migration tag
yields a migration file that contains non pluralized class name:
class CreateTagHierarchy
which should be:
class CreateTagHierarchies
this prevents rake db:migrate from running correctly
/lib/generators/closure_tree/migration_generator.rb
line 22
old code worked:
"Create#{class_name}Hierarchies".gsub('::', '')
new code does not work:
"Create#{ct.hierarchy_class_name}".gsub(/\W/, '')
does not work
Weird! I thought i did it correctly.
Oh the code was altered! cc @mceachen
Renaming the migration class name manually from CreateTagHierarchy to CreateTagHierarchies seems to work (as a workaround, until fixed).