Skip to content
This repository

Fancy pants drag-drop sortable lists for ActiveScaffold

branch: rails-3.2

This branch is 0 commits ahead and 22 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 frontends
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 active_scaffold_sortable.gemspec
Octocat-spinner-32 init.rb
README.textile

Drag-Drop Sortable for ActiveScaffold

Currently, this plugin is compatible with rails 3.x and ActiveScaffold 3.x gems.

Overview

This plugin enables those slicker-than-snot ajax drag-drop sortable elements on your active-scaffold page, with so little configuration you almost get it for free.

Installation

You’ll need at least ActiveScaffold 3.x to use this, and rails 3.x

gem install active_scaffold_sortable

Usage

Step 1

Create a model with a column named ‘position’:

# app/models/entry.rb

# id           integer
# title        string(255)
# birthday     date
# position     integer

Step 2

Add acts_as_list to the model.


class Entry < ActiveRecord::Base
acts_as_list # this line
end

You can skip adding acts_as_list to the model, but you will have to enable sortable in the controller.

# app/controllers/entries_controller.rb

class EntryController < ApplicationController
  active_scaffold :entries do |config|
    config.actions << :sortable
    config.sortable.column = :position
  end
end

Support

If you have issues installing the plugin, search / post to the Active Scaffold forum or Create an issue

Contributing

Fork, hack, push, and request a pull:

http://github.com/activescaffold/active_scaffold_sortable/

License

Released under the MIT license (included).

Author

Contact me:


Tim Harper – irb(main):001:0> ( ‘tim_see_harperATgmail._see_om’.gsub(‘see’, ‘c’).gsub(‘AT’, ‘@’) )
Sergio Cambra – irb(main):001:0> ( ‘sergioATentrecables._see_om’.gsub(‘see’, ‘c’).gsub(‘AT’, ‘@’) )
Something went wrong with that request. Please try again.