On Fri, Mar 8, 2013 at 3:35 AM, Jordon Bedwell <[email protected]> wrote: > `params.require(:foo).permit(*Foo::DOCUMENT_FIELDS.map(&:to_sym))` > Though if I'm honest I probably would expect you to not take the long > trip with map and to_sym, might as well just leave them as string keys > because params has indifferent access with default keys being all > string keys for security.
I forgot to say what *[] does. It will expand the array into args. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

