Couldn't you also use the human readable id style "#-name" and have ruby handle grabbing the number out of it?
On Feb 5, 10:02 am, Bryan Larsen <[email protected]> wrote: > My standard trick is to set an ID on the element that contains the id > and then use a regex to pull it out: > > <div id="attendee-#{this_field}"> > > var id=parseInt(object.id.replace("attendee-", "")); > > Bryan > > Matt Jones wrote: > > > On Feb 5, 2010, at 9:51 AM, Mikkel WF wrote: > > >> I can see that the Hobo.ajaxRequest should have a URL to invoke > >> (obviously :)).. > > >> I my case i have 3 transistions with these generated routes PUT: > >> /event_attendees/:id/available > >> /event_attendees/:id/volunteer > >> /event_attendees/:id/manage > > >> The list item itself that gets moved (and triggers the receive > >> function) hasn't got any id, so i'm looking for at nice way of > >> implementing that, so its easy for the js to pull it out (sorry for > >> the noob approach, but i haven't really worked with js before). > > > All you'll need is some way to get the corresponding ID out of the > > draggable objects - maybe a hidden field? I've also (ab)used the rel= > > attribute to handle this - you can grab it with jQuery(object).attr('rel'). > > > --Matt Jones > > -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
