iron-meteor/iron-url

Handle arrays in parameters

Closed this issue · 2 comments

The plan is to use rail's style, and have URLs of the form

/path?foo[]=a&foo[]=b

To end up with this.params.foo === ['a', 'b'].

The alternative is /path?foo=a&foo=b. But the downside there is you can't do a single element array, which is sucky. Either way you can't do a zero-element array. Not sure if there's anything principled that can be done about this.

Let me know if you want me to go ahead with this.

Yep sounds good

On Jul 17, 2014, at 2:21 AM, Tom Coleman notifications@github.com wrote:

The plan is to use rail's style, and have URLs of the form

/path?foo[]=a&foo[]=b
To end up with this.params.foo === ['a', 'b'].

The alternative is /path?foo=a&foo=b. But the downside there is you can't do a single element array, which is sucky. Either way you can't do a zero-element array. Not sure if there's anything principled that can be done about this.

Let me know if you want me to go ahead with this.


Reply to this email directly or view it on GitHub.

This appears to be on master.