Include Riyad Preukschas suggestions.
This commit is contained in:
parent
f6957f7658
commit
157b038661
1 changed files with 2 additions and 1 deletions
|
@ -160,7 +160,8 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def image_url(source)
|
def image_url(source)
|
||||||
root_url.sub(/#{root_path}$/,'') + path_to_image(source)
|
# prevent relative_root_path being added twice (it's part of root_url and path_to_image)
|
||||||
|
root_url.sub(/#{root_path}$/, path_to_image(source))
|
||||||
end
|
end
|
||||||
alias_method :url_to_image, :image_url
|
alias_method :url_to_image, :image_url
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue