Strong Parameters the Right Way
Use ActionParameter gem to handle your parameters.
Checkout this article with a comparison of the current patterns used to work with Strong Parameters.
Written by Ezequiel Delpero
Related protips
3 Responses
I think it's better to handle parameters in form class. What do you think?
over 1 year ago
·
What exactly would be a form class? If you mean something like Reform gem, you'll be coupling you parameters logic in a form class, and the form would be knowing too much and so you'll be breaking the Single Responsability Principle.
over 1 year ago
·
What makes the gem better than just using strong parameters the regular way we know it to be. If I'm too lazy to list all the parameters, I use the permit!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#