Permalink
Browse files

Update installation instructions

  • Loading branch information...
1 parent 6ac647c commit eed485d3cee9f51044c7687fede3b7a58b4c5182 @oriolgual oriolgual committed Mar 29, 2011
Showing with 2 additions and 14 deletions.
  1. +2 −14 Readme.md
View
@@ -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:

0 comments on commit eed485d

Please sign in to comment.