I have a template that I use for creating Rails web sites. There is
some limited template configuration data which I store in a global
hash variable. This hash variable is initialized in the applications
controller. It all works just fine. However, I think that I need to
clean up my act a bit. The applications controller is probably not
the best place to initialize the global variable. I tried to do it
with an assignment statement in an initializer file; but, it didn’t
work (i.e., view templates didn’t see it for some reason). Can
someone please tell me why that is and what might work? Also, I fully
recognize that global variables are to be avoided (but it sure works
fine ). Does anyone have a suggestion as to what I might use to
replace the global variable?
Thanks for any input.