Merge pull request #2954 from cabeca/fix-image-url-emoji

Fix image url for emoji.
This commit is contained in:
Dmitriy Zaporozhets 2013-03-05 05:52:01 -08:00
commit c2ba868c9b

View file

@ -164,7 +164,8 @@ module ApplicationHelper
end
def image_url(source)
root_url + 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
alias_method :url_to_image, :image_url