Use a custom yaml file that you put in your /config folder.

In your deployment recipe make sure to copy the server config file to
your freshly deployed app. (copy/symlink the file from a local
location).

-Matt


On Fri, Oct 31, 2008 at 2:59 PM, Scott Hodson <[EMAIL PROTECTED]> wrote:
>
> I have some settings in my Rails app that are specific to the
> installation/environment it's running in.  Of particular interest, I
> need a separate Google Maps API key that has to be different on each
> domain since the key is tied to the domain the site is running on, and
> I want it decoupled from the source code of the site.
>
> Questions:
> a)      Where should I put these settings?
> b)      What class(es) can I use to retrieve these settings?
>
> In Java I'd put it in a web.xml file, or a .properties file
> In .NET I'd put it in the <appSettings> section of a .config file
> In PHP I'd create a config.php file that I'd have included everywhere
>
> What's the Rails equivalent?  /conf/environment.rb?  Or make some
> .yaml file and put it in /conf?  I want a file that's completely
> specific to the machine/domain/environment it's running under.
>
>
> scott hodson | 949/709-4496 | [EMAIL PROTECTED]
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to