Forum: Ruby on Rails How to call a standard function from a class inside the lib

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
oo00oo (Guest)
on 2006-02-10 01:13
(Received via mailing list)
Rails mailing list
Kent S. (Guest)
on 2006-02-10 01:38
(Received via mailing list)
There is no such thing as a standard function. url_for method belongs
to ActionController::Base class. So you can pass a reference of your
controller to your mytest method like

class Test
  def self.mytest controller, options
     url = controller.url_for( options )

oo00oo (Guest)
on 2006-02-10 17:34
(Received via mailing list)
Ok, thanks. Not easy to use lib finally
This topic is locked and can not be replied to.