aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderable.rb
diff options
context:
space:
mode:
authorTom Ward <tom@popdog.net>2008-07-18 20:14:12 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-18 20:14:12 -0500
commitc3d1fda555c4bd5f8821d830c685ae5d0e7e52d0 (patch)
tree41a5e9b018d724a82c33ab117bc1e6403e6cbbc5 /actionpack/lib/action_view/renderable.rb
parentd2ccb852d4e1f6f1b01e43f32213053ae3bef408 (diff)
downloadrails-c3d1fda555c4bd5f8821d830c685ae5d0e7e52d0.tar.gz
rails-c3d1fda555c4bd5f8821d830c685ae5d0e7e52d0.tar.bz2
rails-c3d1fda555c4bd5f8821d830c685ae5d0e7e52d0.zip
Set the response content type to that of found template if not explicitly set elsewhere [#444 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/renderable.rb')
-rw-r--r--actionpack/lib/action_view/renderable.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/renderable.rb b/actionpack/lib/action_view/renderable.rb
index 4f865cbced..2b825ac4e9 100644
--- a/actionpack/lib/action_view/renderable.rb
+++ b/actionpack/lib/action_view/renderable.rb
@@ -24,10 +24,13 @@ module ActionView
memoize :compiled_source
def render(view, local_assigns = {})
+ compile(local_assigns)
+
view._first_render ||= self
view._last_render = self
+
view.send(:evaluate_assigns)
- compile(local_assigns)
+ view.send(:set_controller_content_type, mime_type) if respond_to?(:mime_type)
view.send(:execute, method(local_assigns), local_assigns)
end