Steve Koppelman
2006-Oct-18 20:47 UTC
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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Josh Susser
2006-Oct-18 22:20 UTC
Re: calling an ApplicationController method from console
Steve Koppelman 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 Clark has a good description of how to do that here: http://clarkware.com/cgi/blosxom/2006/04/04 -- Josh Susser http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Beena Shetty
2012-Sep-03 09:47 UTC
Re: calling an ApplicationController method from console
To use ApplicationContoller methods from console. run this command on console test = ActionController::Base::ApplicationController.new test.some_method -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.