diff options
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 |
commit | a288cc1e011cf25508d1b56f393023bb40ab441e (patch) | |
tree | f399af686acff4993d08e2a4028855cc6e231126 /actionpack/test/fixtures/bad_customers | |
parent | 8003c541f7e66d1802c46fc4db6f11308a072065 (diff) | |
download | rails-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/bad_customers')
0 files changed, 0 insertions, 0 deletions