[Sdruby] Application Wide Variables

Nathan Colgate Clark nathancolgate at gmail.com
Tue Feb 27 22:10:54 GMT 2007


I'm working on making an app a little bit easier to replicate the same 
app for different clients. Does anybody know of a good way to make 
application-wide variables (global variables?).  Right now I'm putting 
this in the bottom of my environments.rb file:

ENV['BUSINESS_NAME'] = "Wilderness Enterprises"
ENV['BUSINESS_ADDRESS'] = "123 Main"
etc...

And then using this in the views:

<%= ENV['BUSINESS_NAME']%>

And that doesn't "feel" right... but maybe it is.

-Nathan


More information about the Sdruby mailing list