Commit 514713f7 by Prem Sichanugrist

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 029fe02f.
parent 073c06c1
...@@ -96,14 +96,12 @@ In your model: ...@@ -96,14 +96,12 @@ In your model:
In your migrations: In your migrations:
class AddAvatarColumnsToUsers < ActiveRecord::Migration class AddAvatarColumnsToUsers < ActiveRecord::Migration
def up def self.up
change_table :users do |t| add_attachment :users, :avatar
t.has_attached_file :avatar
end
end end
def down def self.down
drop_attached_file :users, :avatar remove_attachment :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