aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/initialization.md
diff options
context:
space:
mode:
authorGosha Arinich <me@goshakkk.name>2013-01-06 01:57:03 +0300
committerGosha Arinich <me@goshakkk.name>2013-01-06 02:01:22 +0300
commit732d3507da930c8d21e21d2c87c96594bb1e4d2c (patch)
treeea042f526542d22e1703ec2e9d2367035300f35d /guides/source/initialization.md
parent2516a1d5c8d3d1391f56d7e8319b4e6342e6bef2 (diff)
downloadrails-732d3507da930c8d21e21d2c87c96594bb1e4d2c.tar.gz
rails-732d3507da930c8d21e21d2c87c96594bb1e4d2c.tar.bz2
rails-732d3507da930c8d21e21d2c87c96594bb1e4d2c.zip
prefer do-end for multiline block
Diffstat (limited to 'guides/source/initialization.md')
-rw-r--r--guides/source/initialization.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/initialization.md b/guides/source/initialization.md
index 32df508f9c..457e28383d 100644
--- a/guides/source/initialization.md
+++ b/guides/source/initialization.md
@@ -232,13 +232,13 @@ when 'server'
Dir.chdir(File.expand_path('../../', APP_PATH)) unless File.exists?(File.expand_path("config.ru"))
require 'rails/commands/server'
- Rails::Server.new.tap { |server|
+ Rails::Server.new.tap do |server|
# We need to require application after the server sets environment,
# otherwise the --environment option given to the server won't propagate.
require APP_PATH
Dir.chdir(Rails.application.root)
server.start
- }
+ end
```
This file will change into the root of the directory (a path two directories back from `APP_PATH` which points at `config/application.rb`), but only if the `config.ru` file isn't found. This then requires `rails/commands/server` which sets up the `Rails::Server` class.