why do i keep getting the error: it''s an Object that has a before and after method!!! A filter must be a Symbol, Proc, Method, or object responding to filter, after or before. around_filter MyTimer.new class MyTimer def initalize @elapsed_time end def before(controller) @start_time = Time.now end def after(controller) @end_time = Time.now end def elapsed @elapsed_time = @end_time - @start_time end end --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 29, 2:59 pm, spokra <spo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > class MyTimerNot an answer to your question, but you might want to look at the Benchmark module to provide similar functionality. ///ark --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
guess I''ll respond to this to get it back into discussion today when people are here!!! On Dec 29, 2007 5:02 PM, Mark Wilden <mark-OCn100epQuBBDgjK7y7TUQ@public.gmane.org> wrote:> > On Dec 29, 2:59pm, spokra <spo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > class MyTimer > > Not an answer to your question, but you might want to look at the > Benchmark module to provide similar functionality. > > ///ark > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---