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
4a05a8a5
Commit
4a05a8a5
authored
Feb 01, 2009
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use attachment_for when validating attachments. Never know when someone might alias the method.
parent
ca481b4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
lib/paperclip.rb
+2
-1
No files found.
lib/paperclip.rb
View file @
4a05a8a5
...
...
@@ -207,7 +207,8 @@ module Paperclip
end
validates_each
(
name
)
do
|
record
,
attr
,
value
|
value
.
send
(
:flush_errors
)
unless
value
.
valid?
attachment
=
record
.
attachment_for
(
name
)
attachment
.
send
(
:flush_errors
)
unless
attachment
.
valid?
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