aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/named_base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb
index 44a2639488..2af7f85463 100644
--- a/railties/lib/rails/generators/named_base.rb
+++ b/railties/lib/rails/generators/named_base.rb
@@ -118,11 +118,11 @@ module Rails
end
def singular_table_name
- @singular_table_name ||= table_name.singularize
+ @singular_table_name ||= (pluralize_table_names? ? table_name.singularize : table_name)
end
def plural_table_name
- @plural_table_name ||= table_name.pluralize
+ @plural_table_name ||= (pluralize_table_names? ? table_name : table_name.pluralize)
end
def plural_file_name