Commit 93b116ef by Jon Yurek

URL interpolation does not interpolate timestamp

parent 03582168
...@@ -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
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment