Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update migration generation instruction

  • Loading branch information...
commit 029fe02f293e8ed2973f84eaa7583676c5fabd1b 1 parent 7dfcc0d
@joneslee85 joneslee85 authored mike-burns committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 README.md
View
10 README.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.