Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Treeview with Drag and Drop ROR
4 Posts
Treeview with Drag and Drop ROR

I've managed to set up acts_as_tree, that's working fine. I also found a good php tutorial, that I've managed to get working in php.

Now I'm trying to port this over to ruby but I'm facing a problem. I have to get some data using a post request, but I'm not able to get it.

I've pasted my code in pastie : http://pastie.org/private/laeycedthniwwkkdhixjcg

This is the line I'm talking about, $updateRecordsArray = $this->input->post('recordsArray');

Could someone tell me how I can get the recordsArray (post request)?

The tutorial can be found at http://www.webresourcesdepot.com/dynamic-dragn-drop-with-jquery-and-php/

Or is there another way to do this? Thanks

or use any acts_as_tree etc, and handle d&d inside your app (even using prototype or jquery)

You could use http://www.jstree.com/ - it's based on JQuery and has multiple call backs for drag/drop extensibilty. It shouldn't be too hard to connect up to a rails app.


I'm looking for a javascript treeview with drag and drop functionality that I can use in Ruby on Rails. I'd like to use it to change the order of pages this way.

Does this exist?

Thanks Wouter

4 Posts
Login to add your message