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
232cacb7
Commit
232cacb7
authored
Mar 01, 2013
by
George Brocklehurst
Committed by
Mike Burns
Jun 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant Hash subclass.
parent
9e9674af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
39 deletions
+0
-39
lib/paperclip.rb
+0
-3
lib/paperclip/attachment_options.rb
+0
-9
test/attachment_options_test.rb
+0
-27
No files found.
lib/paperclip.rb
View file @
232cacb7
...
...
@@ -40,7 +40,6 @@ require 'paperclip/interpolations'
require
'paperclip/tempfile_factory'
require
'paperclip/style'
require
'paperclip/attachment'
require
'paperclip/attachment_options'
require
'paperclip/storage'
require
'paperclip/callbacks'
require
'paperclip/file_command_content_type_detector'
...
...
@@ -176,8 +175,6 @@ module Paperclip
def
has_attached_file
(
name
,
options
=
{})
HasAttachedFile
.
define_on
(
self
,
name
,
options
)
options
=
Paperclip
::
AttachmentOptions
.
new
(
options
)
Paperclip
::
Tasks
::
Attachments
.
add
(
self
,
name
,
options
)
after_save
{
send
(
name
).
send
(
:save
)
}
...
...
lib/paperclip/attachment_options.rb
deleted
100644 → 0
View file @
9e9674af
module
Paperclip
class
AttachmentOptions
<
Hash
def
initialize
(
options
)
options
.
each
do
|
k
,
v
|
self
.
[
]
=
(
k
,
v
)
end
end
end
end
test/attachment_options_test.rb
deleted
100644 → 0
View file @
9e9674af
require
'./test/helper'
class
AttachmentOptionsTest
<
Test
::
Unit
::
TestCase
should
"be a Hash"
do
assert_kind_of
Hash
,
Paperclip
::
AttachmentOptions
.
new
({})
end
should
"respond to []"
do
assert
Paperclip
::
AttachmentOptions
.
new
({}).
respond_to?
(
:[]
)
end
should
"deliver the specified options through []"
do
intended_options
=
{
:specific_key
=>
"specific value"
}
attachment_options
=
Paperclip
::
AttachmentOptions
.
new
(
intended_options
)
assert_equal
"specific value"
,
attachment_options
[
:specific_key
]
end
should
"respond to []="
do
assert
Paperclip
::
AttachmentOptions
.
new
({}).
respond_to?
(
:[]=
)
end
should
"remember options set with []="
do
attachment_options
=
Paperclip
::
AttachmentOptions
.
new
({})
attachment_options
[
:foo
]
=
"bar"
assert_equal
"bar"
,
attachment_options
[
:foo
]
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