{"issue":{"milestone":null,"user":{"login":"khoan","id":45188,"url":"https://api.github.com/users/khoan","avatar_url":"https://secure.gravatar.com/avatar/6e0ed765699d27f1302adff76bc18b0e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6e0ed765699d27f1302adff76bc18b0e"},"title":"url helper with relative_url_root","created_at":"2011-11-26T21:09:35Z","labels":[],"updated_at":"2011-12-17T23:59:17Z","state":"open","id":2357004,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/rails/rails/issues/3766","closed_at":null,"body":"the gist is https://gist.github.com/1390486\r\n\r\n```ruby\r\n# So I was trying to use named route helpers in sprockets, and the app was hosted in a subdirectory.\r\n# This is what I came up with. Please share your hackeries.\r\n#\r\n# using named routes in sprocket Rails 3.1\r\n# you can use this in app/assets/javascripts/bam.js.erb\r\n# or any other erb sprocket asset\r\n\r\nRails.application.routes.url_helpers.bam_path(\r\n  :script_name => ApplicationController.config.relative_url_root\r\n)\r\n```\r\n\r\nany neater solution?","number":3766,"url":"https://api.github.com/repos/rails/rails/issues/3766","comments":4,"assignee":null},"comment":{"user":{"login":"khoan","id":45188,"url":"https://api.github.com/users/khoan","avatar_url":"https://secure.gravatar.com/avatar/6e0ed765699d27f1302adff76bc18b0e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6e0ed765699d27f1302adff76bc18b0e"},"created_at":"2011-12-17T23:59:17Z","updated_at":"2011-12-17T23:59:17Z","id":3192317,"body":"i use the data uri scheme thing so not sure if that breaks image paths in css when data uri scheme is not used...","url":"https://api.github.com/repos/rails/rails/issues/comments/3192317"},"action":"created"}