phi_attrs
phi_attrs copied to clipboard
Rails 7 - Potential Select Attribute Behavior Change
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 onafter_initializewill need to have these for us to be able to use.select.
Example:
if has_attribute?(:foo) && foo.blank?