aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-21 11:42:22 +1100
committerJosé Valim and Mikel Lindsaar <raasdnil@gmail.com>2010-01-21 11:42:22 +1100
commitfbdbac2b88218e5e3e6087c67dacf7e755aa4106 (patch)
tree6fdec21b56ab90fc2ec83cbc38033439a9c84e74 /actionpack/lib/action_controller/metal
parentd3da87ce771845f99bbdc04d6d6587b22655b063 (diff)
parentfa9f000246c2f6010f18bf40237d105b782873e2 (diff)
downloadrails-fbdbac2b88218e5e3e6087c67dacf7e755aa4106.tar.gz
rails-fbdbac2b88218e5e3e6087c67dacf7e755aa4106.tar.bz2
rails-fbdbac2b88218e5e3e6087c67dacf7e755aa4106.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/instrumentation.rb16
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb7
2 files changed, 9 insertions, 14 deletions
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb
index 7b2b037c67..19c962bafa 100644
--- a/actionpack/lib/action_controller/metal/instrumentation.rb
+++ b/actionpack/lib/action_controller/metal/instrumentation.rb
@@ -32,18 +32,12 @@ module ActionController
end
end
- def render(*args, &block)
- if logger
- render_output = nil
-
- self.view_runtime = cleanup_view_runtime do
- Benchmark.ms { render_output = super }
- end
-
- render_output
- else
- super
+ def render(*args)
+ render_output = nil
+ self.view_runtime = cleanup_view_runtime do
+ Benchmark.ms { render_output = super }
end
+ render_output
end
def send_file(path, options={})
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb
index 74e50bb032..475ed54167 100644
--- a/actionpack/lib/action_controller/metal/rendering.rb
+++ b/actionpack/lib/action_controller/metal/rendering.rb
@@ -12,9 +12,10 @@ module ActionController
super
end
- def render(options)
- super
- self.content_type ||= options[:_template].mime_type.to_s
+ def render(*args)
+ args << {} unless args.last.is_a?(Hash)
+ super(*args)
+ self.content_type ||= args.last[:_template].mime_type.to_s
response_body
end