Sever a écrit :
Hi I have a simple question. Default format in sortable.create is: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/ and sortable.serialize returns "key[]=value&key[]=value&key[]=value... " What format should I use in sortable.create, if i want to have something like that (after serialize): "value,value,value"
Well, if so, you're going to have to add your stripping code: the format string is used only to isolate two groups: the param name and its value. The code requiring such two groups and putting them in query format is hard-coded, as this is what serialize *does*. However, you can always strip serialize's result, with something like this (untested and probably optimizable): mySortable.serialize().replace(/[^=]+?=/g, '').replace(/&/g, ',') -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
