Skip to content

Commit d2a1167

Browse files
committed
ActiveModel::AttributeAssignment requires Model#respond_to_missing?
1 parent a9ce4fb commit d2a1167

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/fixtures/poro.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ def method_missing(meth, *args)
1616
end
1717
end
1818

19+
# required for ActiveModel::AttributeAssignment#_assign_attribute
20+
# in Rails 5
21+
def respond_to_missing?(method_name, _include_private = false)
22+
attributes.key?(method_name.to_s.tr('=', '').to_sym) || super
23+
end
24+
1925
def cache_key_with_digest
2026
"#{cache_key}/#{FILE_DIGEST}"
2127
end

0 commit comments

Comments
 (0)