Skip to content

Commit 8019597

Browse files
authored
Merge pull request rails#54649 from yedhink/54529-doc-plural-table-names-limitation
[ci skip] Document pluralize_table_names limitation with Rails generators
2 parents bcab3ae + 43efe46 commit 8019597

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

guides/source/configuring.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,13 @@ Lets you set an array of names of environments where destructive actions should
10771077
10781078
Specifies whether Rails will look for singular or plural table names in the database. If set to `true` (the default), then the Customer class will use the `customers` table. If set to `false`, then the Customer class will use the `customer` table.
10791079
1080+
WARNING: Some Rails generators and installers (notably `active_storage:install`
1081+
and `action_text:install`) create tables with plural names regardless of this
1082+
setting. If you set `pluralize_table_names` to `false`, you will need to
1083+
manually rename those tables after installation to maintain consistency.
1084+
This limitation exists because these installers use fixed table names
1085+
in their migrations for compatibility reasons.
1086+
10801087
#### `config.active_record.default_timezone`
10811088
10821089
Determines whether to use `Time.local` (if set to `:local`) or `Time.utc` (if set to `:utc`) when pulling dates and times from the database. The default is `:utc`.

0 commit comments

Comments
 (0)