-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
28 lines (18 loc) · 749 Bytes
/
README
File metadata and controls
28 lines (18 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
= AppConfig
Very simple Rails plugin for storing application specific configuration, e.g. emails, urls, etc.
Based on http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/
== Description
You can create config.yml file by hand in #{RAILS_ROOT}/config directory, or using generator:
script/generate app_config
Here is config.yml content sample:
common:
support_email: admin@myhost.com
root_url: myhost.com
photos_max_number: 6
production:
email_exceptions: true
development:
root_url: localhost:3000
photos_max_number: 10
Sections are not required, so you can leave only that you need.
Now you can use theese values as AppConfig.NAME, for example AppConfig.support_email, AppConfig.root_url, etc.