Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
small readme change after minor version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersing committed Jul 12, 2011
1 parent 7341d4e commit aaed76f
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ config.server.host #=> "localhost"
config.admins.include? User.find_by_name("leon") #=> true
```

Thanks to tonywok for starting the inheritance work... this is now possible:

structure:
config/
application.yml #=> (host: 'production.local')
application/
development.yml #=> (host: 'development.local')
test.yml #=> (host: 'test.local')

if each has a host... then you can call it like so...

ENV["APP_ENV"] ||= "test" #=> current support vars are "RACK_ENV", "RAILS_ENV", "APP_ENV"
MyConfig.application.host.should == "test.local"

## Known Issues

* Right now data is first in- first out. If you have 2 config files with the same name
the last one in, wins.
* There is no inheritence. You can't set global options and then over-ride them with
another file.

You can however, augment the settings anytime you like.

```ruby
config.admins.pop #=> gives one of our admins.
```

## Future

Expand Down

0 comments on commit aaed76f

Please sign in to comment.