diff options
author | Lucas Mazza <luc4smazza@gmail.com> | 2011-12-21 17:31:53 -0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-21 21:17:17 +0100 |
commit | b5bb3f85585402dc9bedb93e98c13587657eabd4 (patch) | |
tree | 045fb5443ff106f62df0df5083e9f62b3a86467b /actionpack/lib | |
parent | 2d07c60b684a7082fa5dc052c9f965adcda1cb75 (diff) | |
download | rails-b5bb3f85585402dc9bedb93e98c13587657eabd4.tar.gz rails-b5bb3f85585402dc9bedb93e98c13587657eabd4.tar.bz2 rails-b5bb3f85585402dc9bedb93e98c13587657eabd4.zip |
raises an ArgumentError if no valid options are given to TemplateRenderer#determine_template
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/renderer/template_renderer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |