Thursday, February 23, 2012

Re: [Rails] parameter values

On 24.02.2012, at 0:48, Hassan Schroeder wrote:

> Exactly what he said -- the same name.
>
> This: http://example.com/?foo=bar&foo=baz&foo=xyz

Unacceptable :)

Rails' approach: each key is unique.

If you want to get them grouped, just wrap them to array, and your params accessor will be like: {:foo => ['bar','bad','xyz']}

>
> Yeah, I've never understood that choice.
>

Philosophy.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate