To Use or not to use global variable

Hi
My application has facility that any user can create a ticket from
the intranet site.So upon creating a ticket he gives an email id .And I
have to send mail back to this mail id giving created ticket’s
information…My application is running on differnt ports (say 3000 and
3001 or example) Both for two companies…So as part of ticket creation
email to be send to [email protected](if it created from company 1
intranet), and similarly [email protected] it created from company 2
intranet…here [email protected] and [email protected] are text boxes
eneterd by the user
So where will I store the portion after @ (company1,company2) .Is
it inside a global variable by reading it from a yml file?This I am
doing to change code for second company…I think you understand the
problem

  And also one thing Suppose if I store it in a yml file can I call

this only once when I enter in to the controller …As far I undestod
before_filer is called = no of times specified action is called

Thanks in advance
Sijo

On Nov 5, 2008, at 2:39 AM, Sijo Kg wrote:

company 2
intranet…here [email protected] and [email protected] are text boxes
eneterd by the user
So where will I store the portion after @ (company1,company2) .Is
it inside a global variable by reading it from a yml file?This I am
doing to change code for second company…I think you understand the
problem

 And also one thing Suppose if I store it in a yml file can I call

this only once when I enter in to the controller …As far I undestod
before_filer is called = no of times specified action is called

Start here.

http://agilewebdevelopment.com/plugins/application_config

‘application_config’ eases project configuring by introducing yaml
config file in RAILS_ROOT/config folder and provides handful methods
accessing config values based on current rails environment. So, you
can have separate sets of configuration properties for each rails
environment you use.