Last Updated: February 25, 2016
·
1.206K
· edelpero

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.

3 Responses
Add your response

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 ·