added some helper methods to content_types liquid drops (via @KarlBright)
This commit is contained in:
parent
333b6fab5c
commit
6070da8a5c
@ -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) }
|
||||||
|
Loading…
Reference in New Issue
Block a user