You can’t use class variables in rails. Unless you’d like to develop in production mode (specifically with config.cache_classes = true). In development mode all classes are reloaded on each request, which clears all class variables.
I had the perfect place to use them – while running a mass synchronization, and needing to store the timestamp (I couldn’t use the latest last_updated from each record). It worked perfect in ./script/console but failed entirely through the browser.
You can’t use class variables in rails.
You can’t use class variables in rails. Unless you’d like to develop in production mode (specifically with config.cache_classes = true). In development mode all classes are reloaded on each request, which clears all class variables.
I had the perfect place to use them – while running a mass synchronization, and needing to store the timestamp (I couldn’t use the latest last_updated from each record). It worked perfect in ./script/console but failed entirely through the browser.