diff options
Diffstat (limited to 'railties/lib/generators/named_base.rb')
-rw-r--r-- | railties/lib/generators/named_base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/generators/named_base.rb b/railties/lib/generators/named_base.rb index 9632e6806c..c2b958e311 100644 --- a/railties/lib/generators/named_base.rb +++ b/railties/lib/generators/named_base.rb @@ -28,7 +28,6 @@ module Rails else singular_name end - @table_name.gsub! '/', '_' if class_nesting.empty? @class_name = class_name_without_nesting @@ -36,6 +35,8 @@ module Rails @table_name = class_nesting.underscore << "_" << @table_name @class_name = "#{class_nesting}::#{class_name_without_nesting}" end + + @table_name.gsub! '/', '_' end # Convert attributes hash into an array with GeneratedAttribute objects. |