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
9b3c51d7
Commit
9b3c51d7
authored
Jul 25, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated validates_attachment_content_type doc to warn of IE tomfoolery.
parent
d08eeb32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
lib/paperclip.rb
+5
-1
No files found.
lib/paperclip.rb
View file @
9b3c51d7
...
@@ -180,7 +180,11 @@ module Paperclip
...
@@ -180,7 +180,11 @@ module Paperclip
# Places ActiveRecord-style validations on the content type of the file assigned. The
# Places ActiveRecord-style validations on the content type of the file assigned. The
# possible options are:
# possible options are:
# * +content_type+: Allowed content types. Can be a single content type or an array. Allows all by default.
# * +content_type+: Allowed content types. Can be a single content type or an array.
# Each type can be a String or a Regexp. It should be noted that Internet Explorer uploads
# files with content_types that you may not expect. For example, JPEG images are given
# image/pjpeg and PNGs are image/x-png, so keep that in mind when determining how you match.
# Allows all by default.
# * +message+: The message to display when the uploaded file has an invalid content type.
# * +message+: The message to display when the uploaded file has an invalid content type.
def
validates_attachment_content_type
name
,
options
=
{}
def
validates_attachment_content_type
name
,
options
=
{}
attachment_definitions
[
name
][
:validations
]
<<
lambda
do
|
attachment
,
instance
|
attachment_definitions
[
name
][
:validations
]
<<
lambda
do
|
attachment
,
instance
|
...
...
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