Ruby Forum Ruby on Rails > sortable_element example

Posted by Jorg Lueke (Guest)
on 18.08.2008 07:38
(Received via mailing list)
Does someone have a good example of using sortable_element and then
updating the changed position in the database?  I don't have an issue
getting the drag and drop to work, but saving the changes seems to be
a challenge.
Posted by Ilan Berci (iberci)
on 18.08.2008 22:56
Jorg Lueke wrote:
> Does someone have a good example of using sortable_element and then
> updating the changed position in the database?  I don't have an issue
> getting the drag and drop to work, but saving the changes seems to be
> a challenge.

No idea about sortable_element but the operation is trivial with 
acts_as_list plugin by DHH himself..

hth

ilan
Posted by Jorg Lueke (Guest)
on 19.08.2008 14:25
(Received via mailing list)
On Aug 18, 3:56 pm, Ilan Berci <rails-mailing-l...@andreas-s.net>
wrote:
> Jorg Lueke wrote:
> > Does someone have a good example of using sortable_element and then
> > updating the changed position in the database?  I don't have an issue
> > getting the drag and drop to work, but saving the changes seems to be
> > a challenge.
>
> No idea about sortable_element but the operation is trivial with
> acts_as_list plugin by DHH himself..
>
I do use both.  The tricky piece was getting the right params back
into the controller at the right moment.  All is well now.