From b5bb3f85585402dc9bedb93e98c13587657eabd4 Mon Sep 17 00:00:00 2001 From: Lucas Mazza Date: Wed, 21 Dec 2011 17:31:53 -0200 Subject: raises an ArgumentError if no valid options are given to TemplateRenderer#determine_template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_view/renderer/template_renderer.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/renderer/template_renderer.rb b/actionpack/lib/action_view/renderer/template_renderer.rb index e131afa279..adf87a3f7e 100644 --- a/actionpack/lib/action_view/renderer/template_renderer.rb +++ b/actionpack/lib/action_view/renderer/template_renderer.rb @@ -26,6 +26,8 @@ module ActionView elsif options.key?(:template) options[:template].respond_to?(:render) ? options[:template] : find_template(options[:template], options[:prefixes], false, keys, @details) + else + raise ArgumentError, "You invoked render but did not give any of :partial, :template, :inline, :file or :text option." end end -- cgit v1.2.3