Commit 029fe02f by Trung Lê Committed by Mike Burns

Update migration generation instruction

parent 7dfcc0db
......@@ -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
......
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