Skip to content
Browse files

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
  • Loading branch information...
1 parent 6f9baae commit 18f9d46d4ff0c9be6f4561d06d66f4c55b81731c @cpg cpg committed Mar 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 guides/source/generators.md
View
4 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
```

0 comments on commit 18f9d46

Please sign in to comment.
Something went wrong with that request. Please try again.