Sha256: f1896b11b47317432c791bf5c438e50d996e939dfcc7e5424b71761f2bf2d949
Contents?: true
Size: 598 Bytes
Versions: 54
Compression:
Stored size: 598 Bytes
Contents
class Chapter < ApplicationRecord include WithStats include WithNumber include FriendlyName include TopicContainer belongs_to :book, optional: true belongs_to :topic has_many :exercises, through: :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
54 entries across 54 versions & 2 rubygems