Permalink
Browse files

Revert "Update migration generation instruction"

Let's keep it as class method, as Rails 3.0.x require migration methods
to be class methods.

This reverts commit 029fe02.
  • Loading branch information...
1 parent 073c06c commit 514713f7c54bf63bfa942d4337c676c60b5d16f0 @sikachu sikachu committed Jul 13, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 README.md
View
@@ -96,14 +96,12 @@ In your model:
In your migrations:
class AddAvatarColumnsToUsers < ActiveRecord::Migration
- def up
- change_table :users do |t|
- t.has_attached_file :avatar
- end
+ def self.up
+ add_attachment :users, :avatar
end
- def down
- drop_attached_file :users, :avatar
+ def self.down
+ remove_attachment :users, :avatar
end
end

0 comments on commit 514713f

Please sign in to comment.