Searching for an 'attr_protected' equivalent for Rails 6
gem protected_attributes which served the purpose from rails 4 onwards, needs activemodel < 5.0 and hence is not solving for rails 6.
Any alternatives or better solution for achieving the behavior?
Have you try this gem
gem 'protected_attributes_continued'
This gem adds the class methods attr_accessible
and attr_protected
to declare white or black lists of attributes.
More info click here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.