Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
029fe02f
Commit
029fe02f
authored
Jun 22, 2012
by
Trung Lê
Committed by
Mike Burns
Jun 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update migration generation instruction
parent
7dfcc0db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
README.md
+6
-4
No files found.
README.md
View file @
029fe02f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment