Commit 157b0386 authored by Miguel Cabeça's avatar Miguel Cabeça

Include Riyad Preukschas suggestions.

parent f6957f76
...@@ -160,7 +160,8 @@ module ApplicationHelper ...@@ -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
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