aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderable.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-07-14 13:51:59 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-07-14 13:51:59 -0700
commit2d6562d51b96af518c1eb2947d6d34d5dd5bad12 (patch)
treeccb7d5bef041044ecd67298c198d8cec59d30744 /actionpack/lib/action_view/renderable.rb
parent3fbefecc9cdc0d1a903d6ab76170223166cc69ab (diff)
downloadrails-2d6562d51b96af518c1eb2947d6d34d5dd5bad12.tar.gz
rails-2d6562d51b96af518c1eb2947d6d34d5dd5bad12.tar.bz2
rails-2d6562d51b96af518c1eb2947d6d34d5dd5bad12.zip
Move dead recompile_template? also
Diffstat (limited to 'actionpack/lib/action_view/renderable.rb')
-rw-r--r--actionpack/lib/action_view/renderable.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/renderable.rb b/actionpack/lib/action_view/renderable.rb
index ebb0f1b674..ffcffd1667 100644
--- a/actionpack/lib/action_view/renderable.rb
+++ b/actionpack/lib/action_view/renderable.rb
@@ -69,11 +69,8 @@ module ActionView
# The template will be compiled if the file has not been compiled yet, or
# if local_assigns has a new key, which isn't supported by the compiled code yet.
def recompile?(symbol)
- unless Base::CompiledTemplates.instance_methods.include?(symbol) && Base.cache_template_loading
- true
- else
- false
- end
+ meth = Base::CompiledTemplates.instance_method(template.method) rescue nil
+ !(meth && Base.cache_template_loading)
end
end
end