Methods
A
C
F
H
I
J
M
R
S
U
Instance Public methods
all_types_with_layout()
# File actionpack/test/controller/mime_responds_test.rb, line 129
def all_types_with_layout
  respond_to do |type|
    type.html
  end
end
custom_constant_handling()
# File actionpack/test/controller/mime_responds_test.rb, line 101
def custom_constant_handling
  respond_to do |type|
    type.html   { render :text => "HTML"   }
    type.mobile { render :text => "Mobile" }
  end
end
custom_constant_handling_without_block()
# File actionpack/test/controller/mime_responds_test.rb, line 108
def custom_constant_handling_without_block
  respond_to do |type|
    type.html   { render :text => "HTML"   }
    type.mobile
  end
end
custom_type_handling()
# File actionpack/test/controller/mime_responds_test.rb, line 92
def custom_type_handling
  respond_to do |type|
    type.html { render :text => "HTML"    }
    type.custom("application/crazy-xml")  { render :text => "Crazy XML"  }
    type.all  { render :text => "Nothing" }
  end
end
forced_xml()
# File actionpack/test/controller/mime_responds_test.rb, line 58
def forced_xml
  request.format = :xml

  respond_to do |type|
    type.html { render :text => "HTML"    }
    type.xml  { render :text => "XML"     }
  end
end
handle_any()
# File actionpack/test/controller/mime_responds_test.rb, line 115
def handle_any
  respond_to do |type|
    type.html { render :text => "HTML" }
    type.any(:js, :xml) { render :text => "Either JS or XML" }
  end
end
handle_any_any()
# File actionpack/test/controller/mime_responds_test.rb, line 122
def handle_any_any
  respond_to do |type|
    type.html { render :text => 'HTML' }
    type.any { render :text => 'Whatever you ask for, I got it' }
  end
end
html_or_xml()
# File actionpack/test/controller/mime_responds_test.rb, line 41
def html_or_xml
  respond_to do |type|
    type.html { render :text => "HTML"    }
    type.xml  { render :text => "XML"     }
    type.all  { render :text => "Nothing" }
  end
end
html_xml_or_rss()
# File actionpack/test/controller/mime_responds_test.rb, line 17
def html_xml_or_rss
  respond_to do |type|
    type.html { render :text => "HTML"    }
    type.xml  { render :text => "XML"     }
    type.rss  { render :text => "RSS"     }
    type.all  { render :text => "Nothing" }
  end
end
iphone_with_html_response_type()
# File actionpack/test/controller/mime_responds_test.rb, line 135
def iphone_with_html_response_type
  request.format = :iphone if request.env["HTTP_ACCEPT"] == "text/iphone"

  respond_to do |type|
    type.html   { @type = "Firefox" }
    type.iphone { @type = "iPhone"  }
  end
end
iphone_with_html_response_type_without_layout()
# File actionpack/test/controller/mime_responds_test.rb, line 144
def iphone_with_html_response_type_without_layout
  request.format = "iphone" if request.env["HTTP_ACCEPT"] == "text/iphone"

  respond_to do |type|
    type.html   { @type = "Firefox"; render :action => "iphone_with_html_response_type" }
    type.iphone { @type = "iPhone" ; render :action => "iphone_with_html_response_type" }
  end
end
js_or_html()
# File actionpack/test/controller/mime_responds_test.rb, line 26
def js_or_html
  respond_to do |type|
    type.html { render :text => "HTML"    }
    type.js   { render :text => "JS"      }
    type.all  { render :text => "Nothing" }
  end
end
json_or_yaml()
# File actionpack/test/controller/mime_responds_test.rb, line 34
def json_or_yaml
  respond_to do |type|
    type.json { render :text => "JSON" }
    type.yaml { render :text => "YAML" }
  end
end
json_xml_or_html()
# File actionpack/test/controller/mime_responds_test.rb, line 49
def json_xml_or_html
  respond_to do |type|
    type.json { render :text => 'JSON' }
    type.xml { render :xml => 'XML' }
    type.html { render :text => 'HTML' }
  end
end
just_xml()
# File actionpack/test/controller/mime_responds_test.rb, line 67
def just_xml
  respond_to do |type|
    type.xml  { render :text => "XML" }
  end
end
made_for_content_type()
# File actionpack/test/controller/mime_responds_test.rb, line 84
def made_for_content_type
  respond_to do |type|
    type.rss  { render :text => "RSS"  }
    type.atom { render :text => "ATOM" }
    type.all  { render :text => "Nothing" }
  end
end
rescue_action(e)
# File actionpack/test/controller/mime_responds_test.rb, line 153
def rescue_action(e)
  raise
end
using_defaults()
# File actionpack/test/controller/mime_responds_test.rb, line 73
def using_defaults
  respond_to do |type|
    type.html
    type.xml
  end
end
using_defaults_with_type_list()
# File actionpack/test/controller/mime_responds_test.rb, line 80
def using_defaults_with_type_list
  respond_to(:html, :xml)
end
Instance Protected methods
set_layout()
# File actionpack/test/controller/mime_responds_test.rb, line 158
def set_layout
  if action_name.in?(["all_types_with_layout", "iphone_with_html_response_type"])
    "respond_to/layouts/standard"
  elsif action_name == "iphone_with_html_response_type_without_layout"
    "respond_to/layouts/missing"
  end
end