How to call a standard function from a class inside the lib


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

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 )
end
end

Kent.

Ok, thanks. Not easy to use lib finally