added some helper methods to content_types liquid drops (via @KarlBright)

This commit is contained in:
Dirk Kelly 2011-02-25 11:47:12 +08:00
parent 333b6fab5c
commit 6070da8a5c

View File

@ -29,6 +29,18 @@ module Locomotive
self.collection.each(&block)
end
def size
self.collection.size
end
def empty?
self.collection.empty?
end
def any?
self.collection.any?
end
def api
{ 'create' => @context.registers[:controller].send('admin_api_contents_url', @content_type.slug) }
end