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:
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
......
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