mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #42237 from Shopify/ar-logger-attr
Make ActiveRecord::Base.logger a class_attribute
This commit is contained in:
commit
811f7471d1
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
* `ActiveRecord::Base.logger` is now a `class_attribute`.
|
||||
|
||||
This means it can no longer be accessed directly through `@@logger`, and that setting `logger =`
|
||||
on a subclass won't change the parent's logger.
|
||||
|
||||
*Jean Boussier*
|
||||
|
||||
* Add `.asc.nulls_first` for all databases. Unfortunately MySQL still doesn't like `nulls_last`.
|
||||
|
||||
*Keenan Brock*
|
||||
|
|
|
@ -17,7 +17,7 @@ module ActiveRecord
|
|||
# Accepts a logger conforming to the interface of Log4r which is then
|
||||
# passed on to any new database connections made and which can be
|
||||
# retrieved on both a class and instance level by calling +logger+.
|
||||
mattr_accessor :logger, instance_writer: false
|
||||
class_attribute :logger, instance_writer: false
|
||||
|
||||
##
|
||||
# :singleton-method:
|
||||
|
|
Loading…
Reference in a new issue