# Rails URL helpers ## Using URL helpers outside views Instead of building the URL yourself, you can rely on the URL helpers which will always be based on your current routes: ```ruby class RequestUserCallBackJob < ApplicationJob include Rails.application.routes.url_helpers def perform(user) Net::HTTP.post( "http://userinfoapi.com/", body: {callback_to: user_url(user, host: "myapp.com")}) end end ``` Topic: [[Ruby on Rails]]