aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorCyril Jouve <jv.cyril@gmail.com>2013-01-20 03:38:45 +0100
committerCyril Jouve <jv.cyril@gmail.com>2013-01-20 03:38:45 +0100
commit03a391482aa6a9d532eb43bb3e697852e0b83618 (patch)
treeae73b1c90e97f9e0f49d65723da1162c67d74ff0 /guides/source
parent2b7a621e6a3bcbe40432d7adb75d5acdd798d1c6 (diff)
downloadrails-03a391482aa6a9d532eb43bb3e697852e0b83618.tar.gz
rails-03a391482aa6a9d532eb43bb3e697852e0b83618.tar.bz2
rails-03a391482aa6a9d532eb43bb3e697852e0b83618.zip
consistently inherit from ApplicationController in guides exemples
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/action_controller_overview.md4
-rw-r--r--guides/source/caching_with_rails.md2
-rw-r--r--guides/source/nested_model_forms.md2
3 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index cc80334af3..7260a48c8c 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -58,7 +58,7 @@ Parameters
You will probably want to access data sent in by the user or other parameters in your controller actions. There are two kinds of parameters possible in a web application. The first are parameters that are sent as part of the URL, called query string parameters. The query string is everything after "?" in the URL. The second type of parameter is usually referred to as POST data. This information usually comes from an HTML form which has been filled in by the user. It's called POST data because it can only be sent as part of an HTTP POST request. Rails does not make any distinction between query string parameters and POST parameters, and both are available in the `params` hash in your controller:
```ruby
-class ClientsController < ActionController::Base
+class ClientsController < ApplicationController
# This action uses query string parameters because it gets run
# by an HTTP GET request, but this does not make any difference
# to the way in which the parameters are accessed. The URL for
@@ -479,7 +479,7 @@ In addition to "before" filters, you can also run filters after an action has be
For example, in a website where changes have an approval workflow an administrator could be able to preview them easily, just apply them within a transaction:
```ruby
-class ChangesController < ActionController::Base
+class ChangesController < ApplicationController
around_action :wrap_in_transaction, only: :show
private
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 7e33edda86..7e4253b1ba 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -138,7 +138,7 @@ Query caching is a Rails feature that caches the result set returned by each que
For example:
```ruby
-class ProductsController < ActionController
+class ProductsController < ApplicationController
def index
# Run a find query
diff --git a/guides/source/nested_model_forms.md b/guides/source/nested_model_forms.md
index 93d8e8dfcd..b90b3bb5fc 100644
--- a/guides/source/nested_model_forms.md
+++ b/guides/source/nested_model_forms.md
@@ -98,7 +98,7 @@ A nested model form will _only_ be built if the associated object(s) exist. This
Consider the following typical RESTful controller which will prepare a new Person instance and its `address` and `projects` associations before rendering the `new` template:
```ruby
-class PeopleController < ActionController:Base
+class PeopleController < ApplicationController
def new
@person = Person.new
@person.built_address