# Global constant for this application
# I define an array here
SOME_GLOBAL_INSTANT = [100, 300, 500, 800, 1000]
I googled by "rails global constants" but get no better solutions. Anyone knows this please tell me.
Another way to load config into controllers is to use YAML file, check out this blog post:
http://snippets.dzone.com/posts/show/287
2 comments:
I used this method, it's clean and "OO".
http://toolmantim.com/articles/consolidating_your_apps_constants
I am considering using the approach from scott's link in the comment above (toolmantim.com), except use the Application_Helper module directly.
Post a Comment