From 2ddbe87e7acc324ce7e0a4784c4d10b79cc49a40 Mon Sep 17 00:00:00 2001 From: Marcel Morgan Date: Sat, 12 Apr 2014 08:31:00 -0500 Subject: Update documentation to use Rails.application instead References to ``AppName::Application` removed in favour of ``Rails.application`` as generated with a new rails 4.1 app. [ci skip] --- guides/source/getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/getting_started.md') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index c54c9efe94..bafb75c668 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -344,7 +344,7 @@ resource. Here's what `config/routes.rb` should look like after the _article resource_ is declared. ```ruby -Blog::Application.routes.draw do +Rails.application.routes.draw do resources :articles -- cgit v1.2.3 From 0e9fab5ff5c43d6f1c6b0eb8d0b1f988b499ebef Mon Sep 17 00:00:00 2001 From: Christopher Owen Date: Mon, 14 Apr 2014 12:06:59 +1000 Subject: - Fix lingering reference to `:text` instead of the newer `:plain` - Section references `form_tag` instead of the `form_for` used in the example --- guides/source/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/getting_started.md') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index bafb75c668..1ae7397696 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -612,7 +612,7 @@ def create end ``` -The `render` method here is taking a very simple hash with a key of `text` and +The `render` method here is taking a very simple hash with a key of `plain` and value of `params[:article].inspect`. The `params` method is the object which represents the parameters (or fields) coming in from the form. The `params` method returns an `ActiveSupport::HashWithIndifferentAccess` object, which @@ -1136,7 +1136,7 @@ The `method: :patch` option tells Rails that we want this form to be submitted via the `PATCH` HTTP method which is the HTTP method you're expected to use to **update** resources according to the REST protocol. -The first parameter of the `form_tag` can be an object, say, `@article` which would +The first parameter of `form_for` can be an object, say, `@article` which would cause the helper to fill in the form with the fields of the object. Passing in a symbol (`:article`) with the same name as the instance variable (`@article`) also automagically leads to the same behavior. This is what is happening here. More details -- cgit v1.2.3 From 1497529d05c8c5e66d9bad9b990b042442266136 Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Mon, 14 Apr 2014 15:55:11 +0200 Subject: [ci skip] Added link to ruby-lang.org installation. --- guides/source/getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/getting_started.md') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 1ae7397696..36bbd1187c 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -99,7 +99,7 @@ ruby 2.0.0p353 ``` If you don't have Ruby installed have a look at -[ruby-lang.org](https://www.ruby-lang.org/en/downloads/) for possible ways to +[ruby-lang.org](https://www.ruby-lang.org/en/installation/) for possible ways to install Ruby on your platform. Many popular UNIX-like OSes ship with an acceptable version of SQLite3. Windows -- cgit v1.2.3