aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r--actionpack/CHANGELOG.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 2490282d6e..24f36e2496 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -99,6 +99,24 @@
format.html.none { render "trash" }
end
+ Variants also support common `any`/`all` block that formats have.
+
+ It works for both inline:
+
+ respond_to do |format|
+ format.html.any { render text: "any" }
+ format.html.phone { render text: "phone" }
+ end
+
+ and block syntax:
+
+ respond_to do |format|
+ format.html do |variant|
+ variant.any(:tablet, :phablet){ render text: "any" }
+ variant.phone { render text: "phone" }
+ end
+ end
+
*Łukasz Strzałkowski*
* Fix render of localized templates without an explicit format using wrong