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