e x p r e s s i c a

ruby on rails, business and technicalities

No public Twitter messages.

  • RSS
  • Facebook
  • Twitter
  • Linkedin

I have provided the source code of the ajax based drag drop tree in rubyonrails in one of my previous posts.
I found some of the people are getting problems to incorporate the code into their running applications so i am providing a sample rails application in which all the code for tree is already been placed well.
However the code written seems to be lagged behind the current trends followed in rails development coz of the fire growth of rails itself, but its simply that when i wrote this tree i was very new to rails so you may find the code looks like an old wine but still tastes good to go with.

CHECK THIS OUT…

Four simple steps to make the tree working…

  1. DOWNLOAD the sample application. (let me know if you are getting any error in downloading the application.)
  2. Create a test database in mysql or modify the file /config/database.yml according to the database and user u need.
  3. Run the command
    ajaxtree> rake db:migrate

    from the application root.

  4. Run the application server by running
    ajaxtree> ruby script/server

    and watch the working tree at http://localhost:3000

53 Responses so far.

  1. Sur Max says:

    Hello Readers,
    Give me your email as the CONTENT of comment for this post and i will mail you the sample application for the tree.
    ========================================================

    Need not to wait till i mail the application
    I have uploaded the application at Ruby Forge…
    DOWNLOAD the application directly.

  2. Sur Max says:

    Hi Zeno, Matt, Bryan !!
    I have mailed you the application.
    ====================================================
    Hello Everyone !!
    I request you to add your email as the CONTENT of the comment too apart from providing it into the email field.

  3. rajeev gupta says:

    no comments

  4. Matteo says:

    I leave my mail for the sample code! Thanks

  5. Brian says:

    Thanks a lot!

  6. Sur Max says:

    Hi Brian, Hi Matteo !!
    I have mailed the sample application…

  7. Scott Becker says:

    Can you mail me the sample app too please? Thanks!

  8. Sur Max says:

    Hi scott !!
    I have mailed the sample application…

  9. hemant says:

    AAP KA DHANYA WAAD CODE BHIJWANE KE LIYE
    Jeete raho Beta
    Bhagwan tumhari umar lambi kare
    JUG-2 JIYO SADA SUHAGAN RAHO
    WAISE TUM LADKI HO NA BETI

  10. Sur Max says:

    Hi Hemant, Robin !!
    I have mailed the sample application…

  11. Sur Max says:

    Hi Mark !!
    I have mailed the sample application…

  12. gabriel says:

    gabriel DOT horner AT gmail DOT com

    Thanks

  13. Sur Max says:

    Hi Gabriel !!
    I have mailed the sample application…

  14. Brian Kassay says:

    Thanks! Looking forward to the example!

    brian.kassay@sypris.com

  15. Sur Max says:

    Hi Brian !!
    I have mailed the sample application…

  16. opa says:

    Hello Sur,
    can you mail me your sample app please ?
    opa AT asimage DOT com

    thx :)

  17. Sur Max says:

    Hi Opa !!
    I have mailed the sample application…

  18. Sur Max says:

    Hi Nata !!
    I have mailed the sample application…

  19. charlysquare says:

    Hi,

    Here my mail for the content :

    charlysquare@altern.org

    Thanks a lot ;=)

  20. Dene Egglestone says:

    Can you please email the sample application to degglestone@xtra.co.nz. Thanks

  21. Sur Max says:

    Hi Charly, Hi Dene !!
    I have mailed the sample application…

  22. med says:

    Thank you !

  23. Felipe says:

    wena wena

  24. Sur Max says:

    Hi med, fel, felipe !!
    I have mailed the sample application…

  25. Van says:

    Please send me too..
    rozenbom@gmail.com

  26. Sur Max says:

    Hi Van !!
    I have mailed the sample application…

  27. andy says:

    mitlenatch@gmail.com

    would love the source code when you get a chance! thanks for all of the hard work!

    cheers,
    andy

  28. Sur Max says:

    Hi Andy !!
    I have mailed the sample application…

  29. Heya. Kinda tideous having to mail it, isn’t it? There’s tons of free file sharing sites out there. Anyway, please mail it to me =D

  30. Sur Max says:

    Hi August !!
    I have mailed the sample application…

    I agree with you August… I am moving it to RubyForge, although its not that precise code as it has been written far back from now still for the sake of comfort i am moving it there.

  31. David Littman says:

    please mail project to me. thanks.

  32. Sur Max says:

    Hi David !!
    I have mailed the sample application…

  33. Mark says:

    Hi, please send sample code to:

    markmcculley AT gmail DOT com

    Thanks!

  34. Mike Rood says:

    Hi, Sur. This looks great. Please send me the sample app.

  35. Sur Max says:

    Hi Mike, Mark, August !!
    I have uploaded the sample application at Ruby Forge..
    DOWNLOAD the application.

  36. charlysquare says:

    Thanks a lot Sur,

    Your code is really good, simple, and really helpful !!

    I’m working on it to add plugins such as listing the content of a “directory”, or adding a menu (right click with the mouse for ex.) to create a new directory, etc…

    If you’ve already worked on these need, just tell me ;=)

    charly

  37. Sur Max says:

    Hi charly !!
    I am already working on the plugin of tree with some additional functionalities and will be launched within next week. However it will not be exactly what you are saying but i gues it will be good if you first see that plugin and then implement you functionalities there, so that the plugin will be more enhanced i suppose.
    I will post here and inform u too when the plugin will be launched.

    Thanks.

  38. charlysquare says:

    Ok, i’ll wait then !

  39. Sur Max says:

    Well, i guess need not to wait.. If your code is modular enough then it will not be difficult to incorporate it later on.. So, i will look forward to see your modifications (in-case if you will be interested to share with me) .

    Thanks.

  40. charlysquare says:

    No problem, i work a few on it, and share ;=)

  41. charlysquare says:

    No problem, i work a few on it, and share ;=)

    I think i will try to add in place editor function, a create function, and a file-browser-like view.

    Notice i’ve said “try to” lol ;=)

    Charly

  42. tmc says:

    Very nice.

    I’m very new to rails; but I like what I see. I got your demo running in a few minutes. The following may be obvious to more experienced users.

    I noticed if an item from the root is dragged under another item, there is no way to put the item back in the root. Perhaps a root icon is needed?

    Is there an easy way to combine this with the scaffold generator so there is CRUD forms integrated into the tree? I’d like to be able to click ADD, EDIT, VIEW, and DELETE and have the appropriate form be displayed to the right of the tree based on the item selected on the tree.

    Finally, can I toggle the drag and drop feature off?

  43. Sur Max says:

    Hi tmc !!

    Well, i just provided the tree with the minimum features, just to show the awesome approach of rails towards the web development to the users who are still stuck to php stuffs and thereby i am giving a sample application for more ease of feeling amazed out of rails and specifically towards implementing ajax.

    Definitely i will love to help for the things which i feel to be helped to a fresher to rails.

    Of-course the thigs what you are asking like .. ADD, EDIT DELETE etc… and switching off the DRAG-DROP are just a kids play if you are fluent enough with rails development. But as you said that you are new to rails so you can take it as a good assignment to furnish your rails, coz even a fresh rails developers can do it within 1-2 days.

    I must suggest you to do all these things yourself make your tree better.

  44. Roger says:

    Hi.

    When I tried to run this, I get an exception (below)]
    when connecting in after a fresh install (have db setup
    etc).

    I’m running Ruby v1.8.4 with Rails 1.1.6

    ————————————————-

    You have a nil object when you didn’t expect it!
    The error occured while evaluating nil.has_parent?

    Extracted source (around line #54):

    51:
    52:
    53:
    54:
    55:
    56:

  45. Roger says:

    Sorry, it truncated my exception.
    If you send me e-mail, I can send the entire thing back to you.

Sponsors