How I can display a timer, like google do with "(0.33 seconds)", on each page? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I just put up a plugin today to do just that: http://www.agilewebdevelopment.com/plugins/timer V/r Anthony Eden On 11/14/06, rosoft2001 <adingod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > How I can display a timer, like google do with "(0.33 seconds)", on > each page? > > Thanks > > > > >-- Email: anthonyeden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
This works for me: in app/controllers/application.rb: class ApplicationController < ActionController::Base before_filter :set_start_time def set_start_time @start_time = Time.now end end in app/views/layouts/application.rb (preferably after @content_for_layout is called): <p><%= "Time: #{Time.now - @start_time} seconds" %></p> On 11/14/06, rosoft2001 <adingod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > > How I can display a timer, like google do with "(0.33 seconds)", on > each page? > > Thanks > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---