mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
ActiveModel::AttributeAssignment requires Model#respond_to_missing?
This commit is contained in:
parent
a9ce4fb766
commit
d2a11678ef
6
test/fixtures/poro.rb
vendored
6
test/fixtures/poro.rb
vendored
@ -16,6 +16,12 @@ class Model < ActiveModelSerializers::Model
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# required for ActiveModel::AttributeAssignment#_assign_attribute
|
||||||
|
# in Rails 5
|
||||||
|
def respond_to_missing?(method_name, _include_private = false)
|
||||||
|
attributes.key?(method_name.to_s.tr('=', '').to_sym) || super
|
||||||
|
end
|
||||||
|
|
||||||
def cache_key_with_digest
|
def cache_key_with_digest
|
||||||
"#{cache_key}/#{FILE_DIGEST}"
|
"#{cache_key}/#{FILE_DIGEST}"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user