The app I'm working on makes heavy use of Rails services. My problem is I need to get the root url of the app, similar to how you would use root_url
in a view, but this doesn't work in a service. Does anyone know a way to do this other than entering the url in each of my environment setting files?
Edit
I tried using Rails.application.routes.url_helpers.root_url
as it suggests to do here stackoverflow.com/a/5456103/772309 but it expects you to pass the :host => ...
in as a parameter. That's what Im trying to find.