I have an app that heavily relies on dates. There is a moderately expensive calculation that is needed to set these dates, based on the current date. As far as each request is concerned, these dates are constants -- they don't change once created -- but they do change throughout the week. The dates are used in both controllers and models.
My problem is this:
- if the dates didn't change each day, I could set them in config/initializers. But initializers are only evaluated when the server restarts
- if i set the dates in applicationController using before_filter, the dates aren't available to my models
Any ideas? Am I looking at this all wrong? Thanks.