aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-11-23 22:26:53 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-11-23 22:26:53 +0530
commit36ee5802a5e52e0720eaa80fd0473fd131ffe890 (patch)
tree00ce50d50169f5d95ea9a4bb589a381a66a69155 /guides/source
parentb313bcba07ea3c8b3dca3601bec23293f803efcc (diff)
parent58594331565d7e241f63a3cc6562e4a99a5077e8 (diff)
downloadrails-36ee5802a5e52e0720eaa80fd0473fd131ffe890.tar.gz
rails-36ee5802a5e52e0720eaa80fd0473fd131ffe890.tar.bz2
rails-36ee5802a5e52e0720eaa80fd0473fd131ffe890.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_querying.md2
-rw-r--r--guides/source/caching_with_rails.md4
-rw-r--r--guides/source/engines.md2
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`.