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