aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-xactionpack/lib/action_controller/base.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index cbf34e9742..dd061ce143 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -747,12 +747,9 @@ module ActionController #:nodoc:
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 @@ module ActionController #: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)