1

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?

Bivil M Jacob
  • 471
  • 4
  • 9

1 Answers1

2

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

Ibraheem Zafar
  • 346
  • 1
  • 9