Calling an ApplicationController method from console

I am trying to nail down a bug involving a call to a method in
controllers/application.rb. Since the error messages I’m getting to the
browser and logs are useless in this particular case, I want to call it
from the console and look at the output.

I cannot for the life of me figure out how. How do I call a method in
ApplicationController from the console?

Thanks much!

Steve K. wrote:

I am trying to nail down a bug involving a call to a method in
controllers/application.rb. Since the error messages I’m getting to the
browser and logs are useless in this particular case, I want to call it
from the console and look at the output.

I cannot for the life of me figure out how. How do I call a method in
ApplicationController from the console?

Mike C. has a good description of how to do that here:

http://clarkware.com/cgi/blosxom/2006/04/04


Josh S.
http://blog.hasmanythrough.com

To use ApplicationContoller methods from console.

run this command on console

test = ActionController::Base::ApplicationController.new

test.some_method