diff options
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 2 | ||||
-rw-r--r-- | guides/source/caching_with_rails.md | 4 | ||||
-rw-r--r-- | guides/source/engines.md | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 79d00ded0a..32c139df99 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -985,7 +985,7 @@ SELECT categories.* FROM categories ### Specifying Conditions on the Joined Tables -You can specify conditions on the joined tables using the regular [Array](array-conditions) and [String](#pure-string-conditions) conditions. [Hash conditions](#hash-conditions) provides a special syntax for specifying conditions for the joined tables: +You can specify conditions on the joined tables using the regular [Array](#array-conditions) and [String](#pure-string-conditions) conditions. [Hash conditions](#hash-conditions) provides a special syntax for specifying conditions for the joined tables: ```ruby time_range = (Time.now.midnight - 1.day)..Time.now.midnight diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index 4cb76bfe5f..826ddd264a 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -465,14 +465,14 @@ end Instead of a options hash, you can also simply pass in a model, Rails will use the `updated_at` and `cache_key` methods for setting `last_modified` and `etag`: -<ruby> +```ruby class ProductsController < ApplicationController def show @product = Product.find(params[:id]) respond_with(@product) if stale?(@product) end end -</ruby> +``` If you don't have any special response processing and are using the default rendering mechanism (i.e. you're not using respond_to or calling render yourself) then you’ve got an easy helper in fresh_when: diff --git a/guides/source/engines.md b/guides/source/engines.md index f9bbff1c4c..d8f5796dde 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -699,7 +699,7 @@ This section explains how to add and/or override engine MVC functionality in the ### Overriding Models and Controllers -Engine model and controller classes can be extended by open classing them in the main Rails application (since model and controller classes are just Ruby classes that inherit Rails specific functionality). Open classing an Engine class redefines it for use in the main applicaiton. This is usually implemented by using the decorator pattern. +Engine model and controller classes can be extended by open classing them in the main Rails application (since model and controller classes are just Ruby classes that inherit Rails specific functionality). Open classing an Engine class redefines it for use in the main application. This is usually implemented by using the decorator pattern. For simple class modifications use `Class#class_eval`, and for complex class modifications, consider using `ActiveSupport::Concern`. |