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

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