Class: Chapter
Instance Method Summary
collapse
Methods included from Container
#progress_for
#friendly_name, #to_param
#friendly, #navigable_name, #navigation_end?, #siblings
#navigable_name, #next_for, #restart, #siblings
Methods included from WithStats
#started?, #stats_for
aggregate_of, all_except, defaults, #delete, #destroy!, numbered, organic_on, resource_fields, #save, #save_and_notify!, #save_and_notify_changes!, serialize_symbolized_hash_array, #update_and_notify!, update_or_create!, whitelist_attributes
Instance Method Details
#index_usage!(organization = Organization.current) ⇒ Object
21
22
23
24
|
# File 'app/models/chapter.rb', line 21
def index_usage!(organization = Organization.current)
organization.index_usage_of! topic, self
lessons.each { |lesson| lesson.index_usage! organization }
end
|
#pending_siblings_for(user) ⇒ Object
30
31
32
|
# File 'app/models/chapter.rb', line 30
def pending_siblings_for(user)
book.pending_chapters(user)
end
|
#structural_parent ⇒ Object
26
27
28
|
# File 'app/models/chapter.rb', line 26
def structural_parent
book
end
|
#used_in?(organization) ⇒ Boolean
17
18
19
|
# File 'app/models/chapter.rb', line 17
def used_in?(organization)
organization.book == self.book
end
|