Permalink
Browse files

Update migration generation instruction

  • Loading branch information...
1 parent 7dfcc0d commit 029fe02f293e8ed2973f84eaa7583676c5fabd1b @joneslee85 joneslee85 committed with mike-burns Jun 22, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 README.md
View
@@ -95,12 +95,14 @@ In your model:
In your migrations:
class AddAvatarColumnsToUsers < ActiveRecord::Migration
- def self.up
- add_attachment :users, :avatar
+ def up
+ change_table :users do |t|
+ t.has_attached_file :avatar
+ end
end
- def self.down
- remove_attachment :users, :avatar
+ def down
+ drop_attached_file :users, :avatar
end
end

0 comments on commit 029fe02

Please sign in to comment.