Skip to content

Commit

Permalink
Update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolgual committed Mar 29, 2011
1 parent 6ac647c commit eed485d
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,9 @@ references a `next` element, which seems a bit more sensible :)

##Usage

You must add two fields (`next_id` and `first`) to your model's table:

class AddResortFieldsToProducts < ActiveRecord::Migration
def self.up
add_column :products, :next_id, :integer
add_column :products, :first, :boolean
add_index :products, :next_id
add_index :products, :first
end
First, run the migration for the model you want to Resort:

def self.down
remove_column :products, :next_id
remove_column :products, :first
end
end
rails generate resort:migration product

Then in your Product model:

Expand Down

0 comments on commit eed485d

Please sign in to comment.