Sha256: 8fe27bc38e994304658e0708b18c85111d923c934e0743138107e1ca0808d57d
Contents?: true
Size: 558 Bytes
Versions: 20
Compression:
Stored size: 558 Bytes
Contents
class Chapter < ApplicationRecord include WithStats include WithNumber include FriendlyName include TopicContainer belongs_to :book, optional: true belongs_to :topic include SiblingsNavigation include TerminalNavigation def used_in?(organization) organization.book == self.book end def pending_siblings_for(user) book.pending_chapters(user) end def index_usage!(organization = Organization.current) organization.index_usage_of! topic, self lessons.each { |lesson| lesson.index_usage! organization } end end
Version data entries
20 entries across 20 versions & 1 rubygems