apsislabs / phi_attrs

HIPAA compliant PHI access logging for Ruby on Rails.
MIT License
27 stars 3 forks source link

Rails 7 - Potential Select Attribute Behavior Change #61

Open egreer opened 2 years ago

egreer commented 2 years ago

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?