I want to display current time of system on page using Ror.But time will change like on watch that seconds will be continuously changed without refresh page.
currently i am display time using this code
Time.now.in_time_zone("Central Time (US & Canada)").to_s.split(" ").second
and it display
06:01:43
But the problem is it show static time and seconds not increase like on watch.
After that I use this code and enjoy….
where
dashboardis my controller andgive_timeis action