add getter to the size of an asset collection in liquid

This commit is contained in:
dinedine 2011-01-30 00:30:24 +01:00
parent da51dbc14e
commit 02039159d7
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ module Locomotive
}
end
def size
@collection.assets.size
end
def before_method(meth)
return '' if @collection.nil?
@collection.send(meth)