I want to create a copyright (c) 2014
notice in my footer.
But I want it to cycle through all the years/months/days without me having to change that.
I have a _footer.html.erb
partial where I am doing this.
The obvious easy answer is just to say <%= Time.now.year %>
.
That means that every time the view is loaded, it has to do a Ruby call at the end. It seems kinda expensive, considering that this will appear on every single page of the site and it will have to make a Ruby call for every single load.
Is there a more lightweight/streamlined way, where maybe the value can be cached and be displayed from the cache?