aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/4_1_release_notes.md
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-12-04 12:03:53 +0100
committerYves Senn <yves.senn@gmail.com>2013-12-04 12:03:53 +0100
commitbad0386bc0ed4f180e436d605897831430aa50c9 (patch)
treeb72d69d72048984149b344b85a335a1d2b58b142 /guides/source/4_1_release_notes.md
parent828a8f214535e59d709fd4862605902d1cc21632 (diff)
downloadrails-bad0386bc0ed4f180e436d605897831430aa50c9.tar.gz
rails-bad0386bc0ed4f180e436d605897831430aa50c9.tar.bz2
rails-bad0386bc0ed4f180e436d605897831430aa50c9.zip
remove variants paragraph indent in release notes. [ci skip]
Diffstat (limited to 'guides/source/4_1_release_notes.md')
-rw-r--r--guides/source/4_1_release_notes.md47
1 files changed, 24 insertions, 23 deletions
diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md
index c549c14197..3362f3ae06 100644
--- a/guides/source/4_1_release_notes.md
+++ b/guides/source/4_1_release_notes.md
@@ -31,36 +31,36 @@ Major Features
### Variants
- We often want to render different html/json/xml templates for phones,
- tablets, and desktop browsers. Variants makes it easy.
+We often want to render different html/json/xml templates for phones,
+tablets, and desktop browsers. Variants makes it easy.
- The request variant is a specialization of the request format, like `:tablet`,
- `:phone`, or `:desktop`.
+The request variant is a specialization of the request format, like `:tablet`,
+`:phone`, or `:desktop`.
- You can set the variant in a before_action:
+You can set the variant in a before_action:
- ```ruby
- request.variant = :tablet if request.user_agent =~ /iPad/
- ```
+```ruby
+request.variant = :tablet if request.user_agent =~ /iPad/
+```
- Respond to variants in the action just like you respond to formats:
+Respond to variants in the action just like you respond to formats:
- ```ruby
- respond_to do |format|
- format.html do |html|
- html.tablet # renders app/views/projects/show.html+tablet.erb
- html.phone { extra_setup; render ... }
- end
- end
- ```
+```ruby
+respond_to do |format|
+ format.html do |html|
+ html.tablet # renders app/views/projects/show.html+tablet.erb
+ html.phone { extra_setup; render ... }
+ end
+end
+```
- Provide separate templates for each format and variant:
+Provide separate templates for each format and variant:
- ```
- app/views/projects/show.html.erb
- app/views/projects/show.html+tablet.erb
- app/views/projects/show.html+phone.erb
- ```
+```
+app/views/projects/show.html.erb
+app/views/projects/show.html+tablet.erb
+app/views/projects/show.html+phone.erb
+```
### Spring
@@ -86,6 +86,7 @@ bin/rails console
```
**spring introspection:**
+
```
$ bundle exec spring status
Spring is running: