dekart-paperclip 2.3.1.1 → 2.3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/paperclip/interpolations.rb +5 -0
- metadata +1 -1
|
@@ -38,6 +38,11 @@ module Paperclip
|
|
|
38
38
|
"#{basename(attachment, style)}.#{extension(attachment, style)}"
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
# Returns escaped filename to deal with UTF filenames
|
|
42
|
+
def escaped_filename(*args)
|
|
43
|
+
CGI::escape(filename(*args))
|
|
44
|
+
end
|
|
45
|
+
|
|
41
46
|
# Returns the interpolated URL. Will raise an error if the url itself
|
|
42
47
|
# contains ":url" to prevent infinite recursion. This interpolation
|
|
43
48
|
# is used in the default :path to ease default specifications.
|