aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-12 11:02:06 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-12 13:20:45 +0100
commit3ce9563d42cbec3db69ac31161532460b84abe3a (patch)
tree9c5014fba986b778904703b2c398f0c5d17fa63e /guides
parent6645a2099ae00671807f796d3ef4e70106a9f792 (diff)
downloadrails-3ce9563d42cbec3db69ac31161532460b84abe3a.tar.gz
rails-3ce9563d42cbec3db69ac31161532460b84abe3a.tar.bz2
rails-3ce9563d42cbec3db69ac31161532460b84abe3a.zip
Variants inline syntax documentation [ci skip]
* Extend method documentation * Mention it in actionpack/CHANGELOG * Update release notes
Diffstat (limited to 'guides')
-rw-r--r--guides/source/4_1_release_notes.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md
index 5c50ed83ea..3126f4e0e1 100644
--- a/guides/source/4_1_release_notes.md
+++ b/guides/source/4_1_release_notes.md
@@ -62,6 +62,16 @@ app/views/projects/show.html+tablet.erb
app/views/projects/show.html+phone.erb
```
+You can also simplify the variants definition using the inline syntax:
+
+```ruby
+respond_to do |format|
+ format.js { render "trash" }
+ format.html.phone { redirect_to progress_path }
+ format.html.none { render "trash" }
+end
+```
+
### Spring
New Rails 4.1 applications will ship with "springified" binstubs. This means