class Component
A Component
is a part of an Item
; the principal content-bearing repository resource.
Examples: Page of a book, track of a recording, etc.
Public Instance Methods
collection()
click to toggle source
# File app/models/component.rb, line 22 def collection self.parent.parent rescue nil end
collection_id()
click to toggle source
# File app/models/component.rb, line 26 def collection_id collection.id rescue nil end
index_parent()
click to toggle source
# File app/models/component.rb, line 34 def index_parent Resque.enqueue(Ddr::Jobs::UpdateIndex, parent_id) end
publishable?()
click to toggle source
# File app/models/component.rb, line 30 def publishable? parent.present? && parent.published? end