Sha256: 9c2b9f7f773a881eb52904d64b118e671a5e81849ad3301b5082e1da279500aa

Contents?: true

Size: 1.7 KB

Versions: 14

Compression:

Stored size: 1.7 KB

Contents

h1. Drag-Drop Sortable for ActiveScaffold

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

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

h2. Installation

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


<pre>
gem install active_scaffold_sortable
</pre>

h2. Usage

h4. Step 1

Create a model with a column named 'position':

<pre>
# app/models/entry.rb

# id           integer
# title        string(255)
# birthday     date
# position     integer
</pre>

h4. Step 2

Add acts_as_list to the model.
<pre>
class Entry < ActiveRecord::Base
  acts_as_list # this line 
end
</pre>

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

<pre>
# app/controllers/entries_controller.rb

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

h2. Support

If you have issues installing the plugin, search / post to the "Active Scaffold":http://groups.google.com/group/activescaffold forum or "Create an issue":http://github.com/activescaffold/active_scaffold_sortable/issues

h2. Contributing

Fork, hack, push, and request a pull:

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

h2. License

Released under the MIT license (included).

h2. Author

Contact me:
<pre>
  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', '@') )
</pre>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
active_scaffold_sortable-3.2.13 README.textile
active_scaffold_sortable-3.2.12 README.textile
active_scaffold_sortable-3.2.11 README.textile
active_scaffold_sortable-3.2.10 README.textile
active_scaffold_sortable-3.2.9 README.textile
active_scaffold_sortable-3.2.8 README.textile
active_scaffold_sortable-3.2.7 README.textile
active_scaffold_sortable-3.2.6 README.textile
active_scaffold_sortable-3.2.5 README.textile
active_scaffold_sortable-3.2.4 README.textile
active_scaffold_sortable-3.2.3 README.textile
active_scaffold_sortable-3.2.2 README.textile
active_scaffold_sortable-3.2.1 README.textile
active_scaffold_sortable-3.2.0 README.textile