Navigation Menu

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
Expand Up @@ -23,21 +23,9 @@ references a `next` element, which seems a bit more sensible :)


##Usage ##Usage


You must add two fields (`next_id` and `first`) to your model's table: First, run the migration for the model you want to Resort:

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


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


Then in your Product model: Then in your Product model:


Expand Down

0 comments on commit eed485d

Please sign in to comment.