aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2015-06-25 16:56:13 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2015-06-25 16:56:13 -0500
commit8cc01e0b2bfa75a613720c535d34e451f5de769c (patch)
treed220d2d7c4463848ce00a2402d95b47efa563ecb /guides
parent5f5e6d924973003c105feb711cefdb726f312768 (diff)
parente6be33f1ddafdb3e85b9809d0280439fc83559ae (diff)
downloadrails-8cc01e0b2bfa75a613720c535d34e451f5de769c.tar.gz
rails-8cc01e0b2bfa75a613720c535d34e451f5de769c.tar.bz2
rails-8cc01e0b2bfa75a613720c535d34e451f5de769c.zip
Merge pull request #20697 from 5t111111/add-block-to-add_source
add_source in Application Template should take a block for gem entries
Diffstat (limited to 'guides')
-rw-r--r--guides/source/generators.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/guides/source/generators.md b/guides/source/generators.md
index 14f451cbc9..32bbdc554a 100644
--- a/guides/source/generators.md
+++ b/guides/source/generators.md
@@ -503,6 +503,14 @@ Adds a specified source to `Gemfile`:
add_source "http://gems.github.com"
```
+This method also takes a block:
+
+```ruby
+add_source "http://gems.github.com" do
+ gem "rspec-rails"
+end
+```
+
### `inject_into_file`
Injects a block of code into a defined position in your file.