Forum: Ruby on Rails url_helpers in /lib

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd0ecd69dba2aab1a0261ee46e090139?d=identicon&s=25 Nicholas Wieland (Guest)
on 2013-07-19 13:17
(Received via mailing list)
Hi, I'm trying to generate some static feeds using a script in /lib that
I
will later call from a sidekiq worker and I need to access the URL
helpers
from my library, how can I do it?
What I tried so far is including Rails.application.routes.url_helpers in
my
class but it doesn't seem to work. I've also tried to follow this blog
post
http://hawkins.io/2012/03/generating_urls_whenever...
but still no success.

Does someone know how to use url helpers inside a lib?

  ngw
This topic is locked and can not be replied to.