Using url_helpers inside lib class in rails 4 -
A lib class is used to get an email in my Rail application. The email receiver parses the square email and posts it to an application controller using an HTTP response. Code is displayed for: uri = 'http: // localhost: 3000 / incoming_mail' body = {'from' = & gt; From, 'to' = & gt; For, 'topic' = & gt; Subject, 'message' = & gt; Message} response = net :: HTTP :: post_form (URI.parse (uri), body) The problem is that I do not want to specify the full URL. Is there a way to use 'incoming_mail_path' instead of 'localhost: 3000 / incoming_mail'? I tried to add it: contains rail. Application Light_url_holder but it is not working and returns the following error: Can anyone suggest a solution for it? I am posting the entire class here (the included statement has been updated): Required 'Mail' Requires 'Net / https' Requires 'Net / http' required 'uri' category Em...