hello!
I’m looking for the best option to declare global variables and
constants in my web application, that can be accessed from anywhere of
my program.
I decided to declare the global constants in the ApplicationController,
like this:
class ApplicationController < ActionController::Base
PROJECT_TYPE = 1
end
and accessing this constant in the next way (index.rhtml):
<%= ApplicationControll::PROJECT_TYPE %>
but I guess is not the best option to do this.
There is another way???
thank you very much (and sorry for my english).