aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-24 16:53:10 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-26 20:36:17 +0100
commita288cc1e011cf25508d1b56f393023bb40ab441e (patch)
treef399af686acff4993d08e2a4028855cc6e231126 /actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb
parent8003c541f7e66d1802c46fc4db6f11308a072065 (diff)
downloadrails-a288cc1e011cf25508d1b56f393023bb40ab441e.tar.gz
rails-a288cc1e011cf25508d1b56f393023bb40ab441e.tar.bz2
rails-a288cc1e011cf25508d1b56f393023bb40ab441e.zip
Add any/all support for variants
Like `format.any`, you can do the same with variants. 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
Diffstat (limited to 'actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb')
-rw-r--r--actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb b/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb
new file mode 100644
index 0000000000..e905d051bf
--- /dev/null
+++ b/actionpack/test/fixtures/respond_to/variant_any_implicit_render.html+phablet.erb
@@ -0,0 +1 @@
+phablet \ No newline at end of file