From d2a11678ef18c992739276daf139a2c5f0266341 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Tue, 24 Nov 2015 14:07:48 -0600 Subject: [PATCH] ActiveModel::AttributeAssignment requires Model#respond_to_missing? --- test/fixtures/poro.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fixtures/poro.rb b/test/fixtures/poro.rb index 28ee08d5..573b3fa8 100644 --- a/test/fixtures/poro.rb +++ b/test/fixtures/poro.rb @@ -16,6 +16,12 @@ class Model < ActiveModelSerializers::Model 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 "#{cache_key}/#{FILE_DIGEST}" end