If you want to set global constant in Rails 3, put something similar to the code below in config/environment.rb under the initialie!.
# Initialize the rails application TestApp::Application.initialize! DEFAULT_GLOBAL_CONSTANT_EXAMPLE = 20
That’s it. Hope it helps.

Recent Comments