diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index d6f8fdc444..123c0f9f4a 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -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* diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 1453f786f6..fd261e8045 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -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: