Rails3: Getting the base url

Mittwoch, 27. April 2011, 21:43 Uhr | roberto@vasquez-angel.de |

I don’t know, if there are better ways of getting the base_url in rails, but i’ve come up with this:

request.url.gsub(request.path, '')