<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=7625526986034013157&amp;blogName=Tim%2C+the+Enchanter&amp;publishMode=PUBLISH_MODE_HOSTED&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;homepageUrl=http%3A%2F%2Ftim.theenchanter.com%2F&amp;blogLocale=en&amp;searchRoot=http%3A%2F%2Ftim.theenchanter.com%2Fsearch" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" title="Blogger Navigation and Search"></iframe> <div></div>

About

I'm a ruby developer passionate about developing clean code that makes for programming happiness. I'm also am passionate about freedom, liberty, and capitalism, and enjoy jamming out some good rock or jazz on the piano.

I'm a family man and a I'm a member of The Church of Jesus Christ of Latter Day Saints (AKA the "Mormons") and I wield a strong testimony of my Savior Jesus Christ (yes we're Christians).

I'm currently employed by:

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: http://github.com/activescaffold.

Labels:

You can leave your response or bookmark this post to del.icio.us by using the links below.
Comment | Bookmark | Go to end
  • Blogger Rio says so:
    May 18, 2008 9:48 PM  

    Nicely Done. Better than Railscasts. top

  • Blogger gerold says so:
    May 19, 2008 3:01 AM  

    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 top

  • Blogger Andrew Selder says so:
    June 25, 2008 11:36 AM  

    Tim,

    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. top

  • Blogger Tim Harper says so:
    June 25, 2008 11:53 AM  

    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. top

  • Blogger Paul Russell says so:
    February 18, 2009 7:38 AM  

    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://github.com/activescaffold/active_scaffold_sortable_demo.git`

    I started the server: `script/server start`

    I go to `http://0.0.0.0:3000/`

    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! top