diff options
author | artemave <artemave@gmail.com> | 2010-09-17 20:39:14 +0000 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-12-26 22:32:15 -0800 |
commit | ddd85ef9c6a6297a8ff28816d907bbbf2eae5856 (patch) | |
tree | b2ff8ede17f042e8e007c6103b4063ce7ac75383 /actionpack/test/abstract | |
parent | 9bac649fa4ca6f05795e7cab8d30049aa2410cb8 (diff) | |
download | rails-ddd85ef9c6a6297a8ff28816d907bbbf2eae5856.tar.gz rails-ddd85ef9c6a6297a8ff28816d907bbbf2eae5856.tar.bz2 rails-ddd85ef9c6a6297a8ff28816d907bbbf2eae5856.zip |
#948 template_inheritance
Diffstat (limited to 'actionpack/test/abstract')
-rw-r--r-- | actionpack/test/abstract/abstract_controller_test.rb | 14 | ||||
-rw-r--r-- | actionpack/test/abstract/render_test.rb | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/abstract/abstract_controller_test.rb b/actionpack/test/abstract/abstract_controller_test.rb index 19855490b4..981c023d38 100644 --- a/actionpack/test/abstract/abstract_controller_test.rb +++ b/actionpack/test/abstract/abstract_controller_test.rb @@ -30,14 +30,14 @@ module AbstractController class RenderingController < AbstractController::Base include ::AbstractController::Rendering - def _prefix() end + def _prefixes + [] + end def render(options = {}) if options.is_a?(String) options = {:_template_name => options} end - - options[:_prefix] = _prefix super end @@ -116,8 +116,8 @@ module AbstractController name.underscore end - def _prefix - self.class.prefix + def _prefixes + [self.class.prefix] end end @@ -157,10 +157,10 @@ module AbstractController private def self.layout(formats) begin - find_template(name.underscore, {:formats => formats}, :_prefix => "layouts") + find_template(name.underscore, {:formats => formats}, :_prefixes => ["layouts"]) rescue ActionView::MissingTemplate begin - find_template("application", {:formats => formats}, :_prefix => "layouts") + find_template("application", {:formats => formats}, :_prefixes => ["layouts"]) rescue ActionView::MissingTemplate end end diff --git a/actionpack/test/abstract/render_test.rb b/actionpack/test/abstract/render_test.rb index 25dc8bd804..b9293d1241 100644 --- a/actionpack/test/abstract/render_test.rb +++ b/actionpack/test/abstract/render_test.rb @@ -6,8 +6,8 @@ module AbstractController class ControllerRenderer < AbstractController::Base include AbstractController::Rendering - def _prefix - "renderer" + def _prefixes + %w[renderer] end self.view_paths = [ActionView::FixtureResolver.new( |