Commit 029fe02f by Trung Lê Committed by Mike Burns

Update migration generation instruction

parent 7dfcc0db
...@@ -95,12 +95,14 @@ In your model: ...@@ -95,12 +95,14 @@ In your model:
In your migrations: In your migrations:
class AddAvatarColumnsToUsers < ActiveRecord::Migration class AddAvatarColumnsToUsers < ActiveRecord::Migration
def self.up def up
add_attachment :users, :avatar change_table :users do |t|
t.has_attached_file :avatar
end
end end
def self.down def down
remove_attachment :users, :avatar drop_attached_file :users, :avatar
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment