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
56a2cd69
Commit
56a2cd69
authored
May 03, 2013
by
Mike Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Path collision checks are gone
parent
9f0bc344
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
lib/paperclip/has_attached_file.rb
+0
-5
test/has_attached_file_test.rb
+0
-15
No files found.
lib/paperclip/has_attached_file.rb
View file @
56a2cd69
...
...
@@ -15,7 +15,6 @@ module Paperclip
define_getter
define_setter
define_query
check_for_path_clash
register_with_rake_tasks
add_active_record_callbacks
end
...
...
@@ -66,10 +65,6 @@ module Paperclip
end
end
def
check_for_path_clash
Paperclip
.
check_for_path_clash
(
@name
,
@options
[
:path
],
@klass
.
name
)
end
def
register_with_rake_tasks
Paperclip
::
Tasks
::
Attachments
.
add
(
@klass
,
@name
,
@options
)
end
...
...
test/has_attached_file_test.rb
View file @
56a2cd69
...
...
@@ -19,10 +19,6 @@ class HasAttachedFileTest < Test::Unit::TestCase
assert_adding_attachment
(
'avatar'
).
defines_validation
end
should
'check for a path collision'
do
assert_adding_attachment
(
'avatar'
).
checks_for_path_collision
end
should
'register the attachment with Paperclip::Tasks'
do
assert_adding_attachment
(
'avatar'
).
registers_with_tasks
end
...
...
@@ -66,17 +62,6 @@ class HasAttachedFileTest < Test::Unit::TestCase
end
end
def
checks_for_path_collision
a_class
=
stub_class
Paperclip
.
stubs
(
:check_for_path_clash
)
Paperclip
::
HasAttachedFile
.
define_on
(
a_class
,
@attachment_name
,
{})
assert_received
(
Paperclip
,
:check_for_path_clash
)
do
|
expect
|
expect
.
with
(
@attachment_name
,
nil
,
a_class
.
name
)
end
end
def
registers_with_tasks
a_class
=
stub_class
Paperclip
::
Tasks
::
Attachments
.
stubs
(
:add
)
...
...
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