diff options
author | Cristian Mircea Messel <mess110@gmail.com> | 2014-01-13 21:11:15 +0200 |
---|---|---|
committer | Cristian Mircea Messel <mess110@gmail.com> | 2014-01-14 09:31:51 +0200 |
commit | 9cdc7c0614fabc56d8560deeffae7e949bb9f464 (patch) | |
tree | 41f41835e5ed500e528848d2b794a7f3db049222 /guides/source | |
parent | f1764a2de17bba07bad3ec0d88de152d8279d3bb (diff) | |
download | rails-9cdc7c0614fabc56d8560deeffae7e949bb9f464.tar.gz rails-9cdc7c0614fabc56d8560deeffae7e949bb9f464.tar.bz2 rails-9cdc7c0614fabc56d8560deeffae7e949bb9f464.zip |
single quotes for controller generated routes
Write routes in route.rb with single quotes
get 'welcome/index'
instead of
get "welcome/index"
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/getting_started.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index ebc56cba58..dbcedba800 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -231,7 +231,7 @@ Rails will create several files and a route for you. ```bash create app/controllers/welcome_controller.rb - route get "welcome/index" + route get 'welcome/index' invoke erb create app/views/welcome create app/views/welcome/index.html.erb @@ -272,13 +272,13 @@ Open the file `config/routes.rb` in your editor. ```ruby Rails.application.routes.draw do - get "welcome/index" + get 'welcome/index' # The priority is based upon order of creation: # first created -> highest priority. # # You can have the root of your site routed with "root" - # root "welcome#index" + # root 'welcome#index' # # ... ``` @@ -295,7 +295,7 @@ root 'welcome#index' ``` `root 'welcome#index'` tells Rails to map requests to the root of the -application to the welcome controller's index action and `get "welcome/index"` +application to the welcome controller's index action and `get 'welcome/index'` tells Rails to map requests to <http://localhost:3000/welcome/index> to the welcome controller's index action. This was created earlier when you ran the controller generator (`rails generate controller welcome index`). @@ -328,7 +328,7 @@ Blog::Application.routes.draw do resources :posts - root "welcome#index" + root 'welcome#index' end ``` |