1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/fixtures/respond_to
Łukasz Strzałkowski a288cc1e01 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
2013-12-26 20:36:17 +01:00
..
layouts
all_types_with_layout.html.erb
custom_constant_handling_without_block.mobile.erb
iphone_with_html_response_type.html.erb
iphone_with_html_response_type.iphone.erb
using_defaults.html.erb
using_defaults.xml.builder
using_defaults_with_all.html.erb
using_defaults_with_type_list.html.erb
using_defaults_with_type_list.xml.builder
variant_any_implicit_render.html+phablet.erb Add any/all support for variants 2013-12-26 20:36:17 +01:00
variant_any_implicit_render.html+tablet.erb Add any/all support for variants 2013-12-26 20:36:17 +01:00
variant_inline_syntax_without_block.html+phone.erb Inline variants syntax 2013-12-10 11:55:43 +01:00
variant_plus_none_for_format.html.erb Variants can be declared without a block to signify their presence in the controller 2013-12-07 16:32:38 -08:00
variant_with_implicit_rendering.html+mobile.erb