Skip to content

Instantly share code, notes, and snippets.

@haslinger
haslinger / 0001 Sortable tree structure for Hobo .markdown
Last active December 30, 2015 04:39
Sortable tree structure for Hobo

Sortable tree structure for Hobo

I like the ability to have draggable and sortable lists via acts-as-list in Hobo, but I needed more:

I had a hierarchical structure, like a category tree, that needed to be sortable. I wanted a drag and drop interface. Furthermore the updates should be immediate via Ajax. Because this can take a while for huge trees, the user should be informed clearly, but unobtrusively, when update started, when update suceeded and when it failed.

I found Hobo to be compatible with the Ancestry gem and it plays nicely with Nestable.js and Messenger.js and it doesn't break the Bootstrap look and feel too much.

@morgoth
morgoth / deployer.rake
Created January 27, 2012 20:03
Rake task to copy local files to remote server via FTP
# Rake task to copy local files to remote server via FTP
# required credentials.yml file, that contains keys:
# server, username, password
require "net/ftp"
require "yaml"
class FTPClient
attr_reader :remote_path