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:
parent
6f9baaec79
commit
18f9d46d4f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue