Better error explanation
This commit is contained in:
parent
961c6ac533
commit
4747cd95c1
@ -81,7 +81,7 @@ module RablRails
|
|||||||
# rendering time.
|
# rendering time.
|
||||||
#
|
#
|
||||||
def partial(template_path, options = {})
|
def partial(template_path, options = {})
|
||||||
raise PartialError.new("No object was given to partial") unless options[:object]
|
raise PartialError.new("No object was given to partial #{template_path}") unless options[:object]
|
||||||
object = options[:object]
|
object = options[:object]
|
||||||
|
|
||||||
return [] if object.respond_to?(:empty?) && object.empty?
|
return [] if object.respond_to?(:empty?) && object.empty?
|
||||||
|
Loading…
Reference in New Issue
Block a user