Does this syntax conflict with what's current done for PHP? foo[]=bar&foo[]=baz
I'm a newb at both PHP and Rails - so someone can feel free to correct me here. --John On Thu, Feb 19, 2009 at 9:58 AM, Aaron Quint <[email protected]> wrote: > > Hey All > > I just made the switch recently to jQuery from prototype and I'm > loving every minute of it :) > > I've been using it a lot with a Ruby on Rails backend, and one of the > things I need was a way to nest params like the way Rails handles > forms/objects, eg. with a Page object: > > page[name]=Foo&page[author]=Bar > > Unfortunately, $.param didnt translate objects this way, but adding > just a few simple lines made it work like a charm: > > http://gist.github.com/66948 > > Now: > > $.param({page: {name: 'Foo', author: 'Bar'}) > > Translates to above. > > Thought this might be helpful for other people working with Rails/ > jQuery and with a little clean up could be a nice addition to core. > > Thanks! > --AQ > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
