diff --git a/CHANGELOG.md b/CHANGELOG.md index 350a9196..8641abe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/). - Drop support for ruby 1.9.3, whose EOL was 2015-02-23 - Drop support for ruby 2.0.0, whose EOL was 2016-02-24 +- Remove deprecated config methods: + - PaperTrail.serialized_attributes? + - PaperTrail.config.serialized_attributes + - PaperTrail.config.serialized_attributes= ### Added diff --git a/lib/paper_trail.rb b/lib/paper_trail.rb index e405a3eb..8d75e172 100644 --- a/lib/paper_trail.rb +++ b/lib/paper_trail.rb @@ -34,14 +34,6 @@ module PaperTrail !!PaperTrail.config.enabled end - def serialized_attributes? - ActiveSupport::Deprecation.warn( - "PaperTrail.serialized_attributes? is deprecated without replacement " + - "and always returns false." - ) - false - end - # Sets whether PaperTrail is enabled or disabled for the current request. # @api public def enabled_for_controller=(value) diff --git a/lib/paper_trail/config.rb b/lib/paper_trail/config.rb index caf6b023..f4d95814 100644 --- a/lib/paper_trail/config.rb +++ b/lib/paper_trail/config.rb @@ -18,21 +18,6 @@ module PaperTrail @serializer = PaperTrail::Serializers::YAML end - def serialized_attributes - ActiveSupport::Deprecation.warn( - "PaperTrail.config.serialized_attributes is deprecated without " + - "replacement and always returns false." - ) - false - end - - def serialized_attributes=(_) - ActiveSupport::Deprecation.warn( - "PaperTrail.config.serialized_attributes= is deprecated without " + - "replacement and no longer has any effect." - ) - end - # Previously, we checked `PaperTrail::VersionAssociation.table_exists?` # here, but that proved to be problematic in situations when the database # connection had not been established, or when the database does not exist diff --git a/lib/paper_trail/model_config.rb b/lib/paper_trail/model_config.rb index 61edc973..d4ef0fb6 100644 --- a/lib/paper_trail/model_config.rb +++ b/lib/paper_trail/model_config.rb @@ -80,6 +80,10 @@ module PaperTrail options[:on] = Array(options[:on]) # Support single symbol @model_class.send :include, ::PaperTrail::Model::InstanceMethods if ::ActiveRecord::VERSION::STRING < "4.2" + ::ActiveSupport::Deprecation.warn( + "Your version of ActiveRecord (< 4.2) has reached EOL. PaperTrail " \ + "will soon drop support. Please upgrade ActiveRecord ASAP." + ) @model_class.send :extend, AttributeSerializers::LegacyActiveRecordShim end setup_options(options)