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
244b7e4e
Commit
244b7e4e
authored
Jun 07, 2011
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor previous commit.
parent
0238e681
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
lib/paperclip/interpolations.rb
+1
-1
No files found.
lib/paperclip/interpolations.rb
View file @
244b7e4e
...
@@ -35,7 +35,7 @@ module Paperclip
...
@@ -35,7 +35,7 @@ module Paperclip
# Returns the filename, the same way as ":basename.:extension" would.
# Returns the filename, the same way as ":basename.:extension" would.
def
filename
attachment
,
style_name
def
filename
attachment
,
style_name
(
ext
=
extension
(
attachment
,
style_name
)).
blank?
?
basename
(
attachment
,
style_name
)
:
"
#{
basename
(
attachment
,
style_name
)
}
.
#{
ext
}
"
[
basename
(
attachment
,
style_name
),
extension
(
attachment
,
style_name
)
].
reject
(
&
:blank?
).
join
(
"."
)
end
end
# Returns the interpolated URL. Will raise an error if the url itself
# Returns the interpolated URL. Will raise an error if the url itself
...
...
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