aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/generators.md
diff options
context:
space:
mode:
authorCarlos Puchol <cpg@rocketmail.com>2013-03-22 00:56:39 -0700
committerCarlos Puchol <cpg@rocketmail.com>2013-03-22 00:56:39 -0700
commit18f9d46d4ff0c9be6f4561d06d66f4c55b81731c (patch)
treee083cb31c50b138a45aee7d7bb1cf840e3b6ac46 /guides/source/generators.md
parent6f9baaec790a59eed3813731c54e43a22795a04b (diff)
downloadrails-18f9d46d4ff0c9be6f4561d06d66f4c55b81731c.tar.gz
rails-18f9d46d4ff0c9be6f4561d06d66f4c55b81731c.tar.bz2
rails-18f9d46d4ff0c9be6f4561d06d66f4c55b81731c.zip
fix the initializer block example and clarify
clarify that the contents of the block is expected to return a string. the previous example executed puts and the initializer got nothing. also, made it consistent with the single-line example to be more clear as to what's going on
Diffstat (limited to 'guides/source/generators.md')
-rw-r--r--guides/source/generators.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/generators.md b/guides/source/generators.md
index d7c789e2d8..a8a34d0ac4 100644
--- a/guides/source/generators.md
+++ b/guides/source/generators.md
@@ -589,11 +589,11 @@ Creates an initializer in the `config/initializers` directory of the application
initializer "begin.rb", "puts 'this is the beginning'"
```
-This method also takes a block:
+This method also takes a block, expected to return a string:
```ruby
initializer "begin.rb" do
- puts "Almost done!"
+ "puts 'this is the beginning'"
end
```