diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-08-26 15:13:28 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-26 15:13:28 -0500 |
commit | 9853134b4fec468962260f0e713d2f87046eb8b3 (patch) | |
tree | fe10eded92f430171b8c3dd752d0aaa45240dde3 /actionpack/lib/action_view/renderable_partial.rb | |
parent | 8756dd75b257b17ddda92674d4cc0db307d2153b (diff) | |
download | rails-9853134b4fec468962260f0e713d2f87046eb8b3.tar.gz rails-9853134b4fec468962260f0e713d2f87046eb8b3.tar.bz2 rails-9853134b4fec468962260f0e713d2f87046eb8b3.zip |
Require missing libraries and check for defined ActionController constant so ActionView can be used standalone
Diffstat (limited to 'actionpack/lib/action_view/renderable_partial.rb')
-rw-r--r-- | actionpack/lib/action_view/renderable_partial.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/renderable_partial.rb b/actionpack/lib/action_view/renderable_partial.rb index 342850f0f0..5203e57ead 100644 --- a/actionpack/lib/action_view/renderable_partial.rb +++ b/actionpack/lib/action_view/renderable_partial.rb @@ -16,7 +16,11 @@ module ActionView memoize :counter_name def render(view, local_assigns = {}) - ActionController::Base.benchmark("Rendered #{path_without_format_and_extension}", Logger::DEBUG, false) do + if defined? ActionController + ActionController::Base.benchmark("Rendered #{path_without_format_and_extension}", Logger::DEBUG, false) do + super + end + else super end end |