I used to put Global variables in environment.rb with my Rails 2.3.8 application such as:
MAX_ALLOWD_ITEMS = 6
It doesn\'t seem to work in
I don't know if the solution of adding variables to environment.rb would in fact work in Rails3 - to be specific, if you haven't defined the variable inside a module definition like so:
module MyConfig
Max_ints = 5
end
you won't be able to just use Max_ints, if you just include it as a bare definition. Or at least that's what I found happened when I experimented with this. I also think the suggestion to use the initializers/ folder is possibly a better solution in terms of ease of use. See Permanent variable in Rails