提交 18f9d46d 编写于 作者: C Carlos Puchol

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
上级 6f9baaec
......@@ -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
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册