Saturday, May 17, 2008

activescaffold_sortable updated (with a delightful screencast)

After some long neglect, I finally had a reason to use the active_scaffold_sortable plugin again. Getting in to the code, I was ashamed at how broken it was. But, after about an hour of polishing and cleanup, it's good as new and ready to be used again.

Here's a screencast to show you exactly what it is:

See: activescaffold with sorted lists is fun!

Note: the urls for the repositories have been moved since this screencast was made. The new home for active scaffold repositories can be found here:


Mario Olivio Flores said...

Nicely Done. Better than Railscasts.

Unknown said...

hi tim - thanks for the great plugin.

my routes.rb looks something like this:

map.namespace :admin do |a|
a.resources :pages, :active_scaffold => true, :active_scaffold_sortable => true

i had to add this to lib/config/sortable.rb to make it work:

ActionController::Resources::Resource::ACTIVE_SCAFFOLD_ROUTING[:collection][:reorder] = :post

Andrew Selder said...


Thanks for the great work.

Quick question, using this plug-in: how do you move items between pages?

For instance if you display records in pages of 50, and you want to move the record in position 51 (first line of page 2) to position 50 (last line of page 1).

I really don't see any way to do this using this plugin.

Tim Harper said...

The solution as stands is pagination is off by default. With rare exceptions you shouldn't have drag drop sortable on a really long list.

Perhaps a better solution would be to have a drop target at the bottom and top of active scaffold, which would place the item on the next page.

Russelldad said...

Hey Tim,
This is possibly the coolest plugin since active_scaffold!

I'm desperately trying to get it to work, but everything I try leads me to an error.

The latest thing I tried what to download your demo code and I get an error. I must be missing something very obvious.

Here's what I'm seeing with the demo:

I'm running OSX 10.5.5 / Rails 2.0.2

I cloned the project: `get clone git://`

I started the server: `script/server start`

I go to ``

I get the error `undefined method `active_scaffold' for TasksController:Class`

I would greatly appreciate any help you could provide. I'm trying to finish a masters thesis, and all the time I spend trying to debug plugin installs is time away from my kids!

Thanks for putting this plugin out. That screencast was awesome!