aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Gray <graywh@gmail.com>2012-11-09 15:10:39 -0600
committerWill Gray <graywh@gmail.com>2012-11-09 15:10:39 -0600
commitdcf401e3bc7163aefab856abe7f1d238025c4ef9 (patch)
treedcc2af31a567cb8c62869de3483fb33b42a7903f
parent407e7d499cd9018e112f4f64c404432959820233 (diff)
downloadrails-dcf401e3bc7163aefab856abe7f1d238025c4ef9.tar.gz
rails-dcf401e3bc7163aefab856abe7f1d238025c4ef9.tar.bz2
rails-dcf401e3bc7163aefab856abe7f1d238025c4ef9.zip
Update guides/source/rails_application_templates.md
Add `#environment`
-rw-r--r--guides/source/rails_application_templates.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/source/rails_application_templates.md b/guides/source/rails_application_templates.md
index c3d4c4901e..20944ab258 100644
--- a/guides/source/rails_application_templates.md
+++ b/guides/source/rails_application_templates.md
@@ -85,6 +85,18 @@ For example, if you need to source a gem from "http://code.whytheluckystiff.net"
add_source "http://code.whytheluckystiff.net"
```
+### environment/application(data=nil, options={}, &block)
+
+Adds a line inside the `Application` class for `config/application.rb`.
+
+If options `:env` is specified, the line is appended to the corresponding file in `config/environments`.
+
+```ruby
+environment 'config.action_mailer.default_url_options = { :host => 'http://yourwebsite.example.com' }, :env => 'production'
+```
+
+A block can be used in place of the `data` argument.
+
### vendor/lib/file/initializer(filename, data = nil, &block)
Adds an initializer to the generated application’s `config/initializers` directory.