Commit 157b03866124d562b78583fbcb38b3db8ac84d4e

Authored by Miguel Cabeça
1 parent f6957f76

Include Riyad Preukschas suggestions.

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/helpers/application_helper.rb
... ... @@ -160,7 +160,8 @@ module ApplicationHelper
160 160 end
161 161  
162 162 def image_url(source)
163   - root_url.sub(/#{root_path}$/,'') + path_to_image(source)
  163 + # prevent relative_root_path being added twice (it's part of root_url and path_to_image)
  164 + root_url.sub(/#{root_path}$/, path_to_image(source))
164 165 end
165 166 alias_method :url_to_image, :image_url
166 167 end
... ...