phi_attrs icon indicating copy to clipboard operation
phi_attrs copied to clipboard

Rails 7 - Potential Select Attribute Behavior Change

Open egreer opened this issue 3 years ago • 0 comments

There is a bug/unlisted deprecation in Rails 7 regarding .select and how it creates attribute reflections for fields. To fix Add a has_attribute? check to anything acting on after_initialize will need to have these for us to be able to use .select.

Example: if has_attribute?(:foo) && foo.blank?

egreer avatar Jul 20 '22 14:07 egreer