This commit is contained in:
ccocchi 2012-03-27 18:39:26 +02:00
parent 03bc0f2644
commit 62693749c5

View File

@ -64,7 +64,7 @@ module RablFastJson
def partial(template_path, options = {})
raise "No object was given to partial" if options[:object].blank?
object = options[:object]
template = Library.instance.get(template_path, @context)
template = Library.instance.get(template_path)
object.respond_to?(:each) ? template.render_collection(object) : template.render_resource(object)
end