aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-08-17 12:53:15 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-08-17 12:53:15 -0700
commit8f15565de879bd40c8390884d1d31e52de240323 (patch)
treec6c30c4a07a5d11f46d50853613b909ee0e8c6ae /guides
parent9f6e82ee4783e491c20f5244a613fdeb4024beb5 (diff)
parente158ee50e64e2ae2460cd26be53039922f588300 (diff)
downloadrails-8f15565de879bd40c8390884d1d31e52de240323.tar.gz
rails-8f15565de879bd40c8390884d1d31e52de240323.tar.bz2
rails-8f15565de879bd40c8390884d1d31e52de240323.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'guides')
-rw-r--r--guides/source/caching_with_rails.md7
-rw-r--r--guides/source/contributing_to_ruby_on_rails.md2
-rw-r--r--guides/source/layouts_and_rendering.md2
3 files changed, 8 insertions, 3 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 0902e347e2..d0f3a596fe 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -353,7 +353,12 @@ Instead of an options hash, you can also simply pass in a model, Rails will use
class ProductsController < ApplicationController
def show
@product = Product.find(params[:id])
- respond_with(@product) if stale?(@product)
+
+ if stale?(@product)
+ respond_to do |wants|
+ # ... normal response processing
+ end
+ end
end
end
```
diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md
index 0b05725623..8bc4b10591 100644
--- a/guides/source/contributing_to_ruby_on_rails.md
+++ b/guides/source/contributing_to_ruby_on_rails.md
@@ -397,7 +397,7 @@ inside, just indent it with 4 spaces:
class ArticlesController
def index
- respond_with Article.limit(10)
+ render json: Article.limit(10)
end
end
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index f00f7bca1b..8b37b92139 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -903,7 +903,7 @@ You can also specify multiple videos to play by passing an array of videos to th
This will produce:
```erb
-<video><source src="trailer.ogg" /><source src="movie.ogg" /></video>
+<video><source src="/videos/trailer.ogg" /><source src="/videos/trailer.flv" /></video>
```
#### Linking to Audio Files with the `audio_tag`