1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Carlos Puchol 2013-03-22 00:56:39 -07:00
parent 6f9baaec79
commit 18f9d46d4f

View file

@ -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
```