Merge pull request #933 from airblade/remove_deprecated_config
✂️ Remove deprecated methods re: serialized attributes
This commit is contained in:
commit
6bc1ae2d4b
|
@ -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)
|
||||
|
|
|
@ -91,7 +91,7 @@ ActiveRecord::Schema.define(version: 20110208155312) do
|
|||
t.string "name"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.index ["uuid"], name: "sqlite_autoindex_custom_primary_key_records_1", unique: true
|
||||
t.index ["uuid"], unique: true
|
||||
end
|
||||
|
||||
create_table "customers", force: :cascade do |t|
|
||||
|
|
Loading…
Reference in New Issue