1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix Configuring Active Record [ci skip]

This commit is contained in:
Alexey Markov 2015-08-27 23:16:44 +03:00
parent 53265e8806
commit 0c85705f38

View file

@ -267,8 +267,8 @@ All these configuration options are delegated to the `I18n` library.
* `config.active_record.logger` accepts a logger conforming to the interface of Log4r or the default Ruby Logger class, which is then passed on to any new database connections made. You can retrieve this logger by calling `logger` on either an Active Record model class or an Active Record model instance. Set to `nil` to disable logging.
* `config.active_record.primary_key_prefix_type` lets you adjust the naming for primary key columns. By default, Rails assumes that primary key columns are named `id` (and this configuration option doesn't need to be set.) There are two other choices:
** `:table_name` would make the primary key for the Customer class `customerid`
** `:table_name_with_underscore` would make the primary key for the Customer class `customer_id`
* `:table_name` would make the primary key for the Customer class `customerid`
* `:table_name_with_underscore` would make the primary key for the Customer class `customer_id`
* `config.active_record.table_name_prefix` lets you set a global string to be prepended to table names. If you set this to `northwest_`, then the Customer class will look for `northwest_customers` as its table. The default is an empty string.