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
93b116ef
Commit
93b116ef
authored
May 11, 2009
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
URL interpolation does not interpolate timestamp
parent
03582168
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/paperclip/interpolations.rb
+1
-1
test/interpolations_test.rb
+1
-1
No files found.
lib/paperclip/interpolations.rb
View file @
93b116ef
...
@@ -43,7 +43,7 @@ module Paperclip
...
@@ -43,7 +43,7 @@ module Paperclip
# is used in the default :path to ease default specifications.
# is used in the default :path to ease default specifications.
def
url
attachment
,
style
def
url
attachment
,
style
raise
InfiniteInterpolationError
if
attachment
.
options
[
:url
].
include?
(
":url"
)
raise
InfiniteInterpolationError
if
attachment
.
options
[
:url
].
include?
(
":url"
)
attachment
.
url
(
style
)
attachment
.
url
(
style
,
false
)
end
end
# Returns the timestamp as defined by the <attachment>_updated_at field
# Returns the timestamp as defined by the <attachment>_updated_at field
...
...
test/interpolations_test.rb
View file @
93b116ef
...
@@ -79,7 +79,7 @@ class InterpolationsTest < Test::Unit::TestCase
...
@@ -79,7 +79,7 @@ class InterpolationsTest < Test::Unit::TestCase
should
"reinterpolate :url"
do
should
"reinterpolate :url"
do
attachment
=
mock
attachment
=
mock
attachment
.
expects
(
:options
).
returns
({
:url
=>
":id"
})
attachment
.
expects
(
:options
).
returns
({
:url
=>
":id"
})
attachment
.
expects
(
:url
).
with
(
:style
).
returns
(
"1234"
)
attachment
.
expects
(
:url
).
with
(
:style
,
false
).
returns
(
"1234"
)
assert_equal
"1234"
,
Paperclip
::
Interpolations
.
url
(
attachment
,
:style
)
assert_equal
"1234"
,
Paperclip
::
Interpolations
.
url
(
attachment
,
:style
)
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