Oh, I found the problem. I forgot the "()" after
the method call, so I
was actually passing the function instead of the return
value.
On Apr 29, 6:07 am, Christophe Porteneuve <t... tddsworld.com> wrote:
> gasphynx a écrit :
>
> > I was wondering if this is the place to make
feature requests. If so,
>
> Nope, use prototype-core.
>
> >http://parentnode.org/javascript/defaul
t-arguments-in-javascript-func....
>
> It'll be in 1.5.2. Check the recent enhancement
tickets in the SVN
> about Function#curry and other such nifty features.
>
> > Also, is there a way to have a URI Query String
turned right into a
> > Hash? The String.toQueryParams() function gave me
a fully extended
> > object and after passing it through $H(), it had a
bunch of keys/
> > values that I didn't want.
>
> You'll have to provide a reproducible example.
> String#toQueryParams/parseQuery return an anonymous
object with no
> extensions whatsoever. Passing it to $H will return a
regular Hash
> object, on which iteration (with any of the mixed-in
Enumerable methods,
> or using its keys() method, for instance) will only
provide your
> original props.
>
> However, $H returns a Hash, so if you're using for...in
over it, you'll
> get all the expansions from Enumerable. Iterating over
the contents of
> a Hash should be done using the Enumerable methods it
has, not manually
> with for...in.
>
> Not that the original object returned by
String#toQueryParams is devoid
> of any mixed-in methods: using for...in will work, as
will
> Object.keys(yourObj).
>
> --
> Christophe Porteneuve a.k.a. TDD
> "[They] did not know it was impossible, so they
did it." --Mark Twain
> Email: t... tddsworld.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=
en
-~----------~----~----~----~------~----~------~--~---
|