How about just creating a client model and accessing things that way?

Use a :before_filter to check for a client on all actions. If none exists, redirect to a setup action (where you fill in the basic details for a client).

I'd also stay away from the ENV stuff... smells like configuration!

-- Patrick


On Feb 27, 2007, at 2:10 PM, Nathan Colgate Clark wrote:

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
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to