For no reason. It seems clearer to me the intent of the code: get the root url, remove the root path and append the image path. Either way works. 


On 14/02/2013, at 19:54, Riyad Preukschas <notifications@github.com> wrote:

> In app/helpers/application_helper.rb:
> 
> > @@ -160,7 +160,7 @@ def authbutton(provider, size = 64)
> >    end
> >  
> >    def image_url(source)
> > -    root_url + path_to_image(source)
> > +    root_url.sub(/#{root_path}$/,'') + path_to_image(source)
> Why not root_url.sub(/#{root_path}$/, path_to_image(source)) ?
> 
> —
> Reply to this email directly or view it on GitHub.
>