I assume that it existed in a way (way earlier) before releasing rails 4 as a separate stone https://github.com/rails/strong_parameters
rails 4 by default, if you want to use it with rails 3, just get the gem in your gemfile and go :).
on the github link for the gem, they also wrote amazing documentation on how to use it, so I think you shouldn't have any problems using it.
And, of course, there is nothing new in it, you can do this filtering manually by writing your own filters, and everything can get a little confused with deeply nested hashes and an array inside the hashes and if the keys of the hashes are dynamically created (not fixed)
โYes, instead of a single line, it will take 3 lines,โ and this is what most gems do, and we use them instead of reinventing the wheel and just concentrating on our business logic.
source share