I'd like to show in our app when the latest production deploy was made, as a means of showing an ongoing commitment to improvement, etc, etc.
Off the top of my head I'm thinking of getting a last_updated_at from one of the files, but I'd like to hear other thoughts.
What's the best way to get the date of the latest production deploy dynamically?
Thanks,
Josh
Thanks to mpd who pointed me on the right direction.
For those interested in doing something similar, this is a quick and dirty method that probably can be refined and refactored.
In
app/controllers/application_controller.rb
put this method in the private section:Obviously, replace the timezone with your own (or you can do something fancy for individual user timezones).
In order to have this run all the time I use a
:before_filter
and put it at the top of yourapplication_controller.rb
.And then to actually show this last updated at date, you just throw this or something like it in a layout or a partial or whatever:
Hopefully, this helps others. I'm not keen on having it run in the
ApplicationController
for every access, so suggestions would be appreciated.