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


#1

Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


#2

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.


#3

Ok, thanks. Not easy to use lib finally