Remove deprecated methods re: serialized attributes
These methods were deprecated in PT 5.0.0 https://github.com/airblade/paper_trail/pull/679
This commit is contained in:
parent
8c50e29856
commit
dc4fc621ef
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue