aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-09-10 21:12:11 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-09-10 21:12:11 +0900
commit8b7950e25ebe7db4ee13788714173959bf771a44 (patch)
treee3a55e793582ef17b0ba4594756e826e3e850f7d
parent4828408f0a82211731a02f62007ac99fd6bbd73a (diff)
downloadrails-8b7950e25ebe7db4ee13788714173959bf771a44.tar.gz
rails-8b7950e25ebe7db4ee13788714173959bf771a44.tar.bz2
rails-8b7950e25ebe7db4ee13788714173959bf771a44.zip
add description of passing a block to `add_source` [ci skip]
block support added in 8cc01e0b2bfa75a613720c535d34e451f5de769c
-rw-r--r--guides/source/rails_application_templates.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/guides/source/rails_application_templates.md b/guides/source/rails_application_templates.md
index b7364536c3..edd54826cf 100644
--- a/guides/source/rails_application_templates.md
+++ b/guides/source/rails_application_templates.md
@@ -78,7 +78,7 @@ gem_group :development, :test do
end
```
-### add_source(source, options = {})
+### add_source(source, options={}, &block)
Adds the given source to the generated application's `Gemfile`.
@@ -88,6 +88,14 @@ For example, if you need to source a gem from `"http://code.whytheluckystiff.net
add_source "http://code.whytheluckystiff.net"
```
+If block is given, gem entries in block are wrapped into the source group.
+
+```ruby
+add_source "http://gems.github.com/" do
+ gem "rspec-rails"
+end
+```
+
### environment/application(data=nil, options={}, &block)
Adds a line inside the `Application` class for `config/application.rb`.