In Rails 4, typically I would only permit certain parameters when a form is submitted by declaring a private function with the following code:
params.require(:object).permit(:name, :email, :phone)
However, I'm using form_tag instead of form_for and therefore each field is submitted in the params hash. As I'm not a ruby/rails expert, what's the best way to permit these parameters in an efficient way?
Is this right?
params.require(:params).permit(:name, :email, :phone)
:)
– ddavisonrequire(:params)
– Damien