Permalink
Browse files

Remove unrelated render :yaml changes. References #4185.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 189ecaf commit 953214bd2332857145e1e61e9dc13fac53195633 @jeremy jeremy committed Dec 6, 2006
Showing with 5 additions and 13 deletions.
  1. +3 −11 actionpack/lib/action_controller/base.rb
  2. +2 −2 actionpack/test/controller/mime_responds_test.rb
@@ -747,12 +747,9 @@ def render(options = nil, deprecated_status = nil, &block) #:doc:
elsif xml = options[:xml]
render_xml(xml, options[:status])
-
+
elsif json = options[:json]
render_json(json, options[:callback], options[:status])
-
- elsif yaml = options[:yaml]
- render_yaml(yaml, options[:status])
elsif partial = options[:partial]
partial = default_template_name if partial == true
@@ -833,18 +830,13 @@ def render_xml(xml, status = nil) #:nodoc:
response.content_type = Mime::XML
render_text(xml, status)
end
-
+
def render_json(json, callback = nil, status = nil) #:nodoc:
json = "#{callback}(#{json})" unless callback.blank?
-
+
response.content_type = Mime::JSON
render_text(json, status)
end
-
- def render_yaml(yaml, status = nil) #:nodoc:
- response.content_type = Mime::YAML
- render_text(yaml, status)
- end
def render_nothing(status = nil) #:nodoc:
render_text(' ', status)
@@ -19,11 +19,11 @@ def js_or_html
type.all { render :text => "Nothing" }
end
end
-
+
def json_or_yaml
respond_to do |type|
type.json { render :text => "JSON" }
- type.yaml { render :yaml => "YAML" }
+ type.yaml { render :text => "YAML" }
end
end

0 comments on commit 953214b

Please sign in to comment.