Class: Lesson
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Lesson
- Includes:
- FriendlyName, GuideContainer, ParentNavigation, SiblingsNavigation, WithNumber
- Defined in:
- app/models/lesson.rb
Instance Method Summary collapse
Methods included from ParentNavigation
#leave, #navigable_name, #navigable_parent, #navigation_end?
Methods included from SiblingsNavigation
#navigable_name, #next_for, #restart
Methods included from GuideContainer
#friendly, #index_usage!, #start!, #timed?, #validate_accessible_for!
Methods included from FriendlyName
Methods inherited from ApplicationRecord
aggregate_of, all_except, defaults, name_model_as, numbered, #save, #save_and_notify!, #save_and_notify_changes!, #update_and_notify!, update_or_create!
Instance Method Details
#pending_siblings_for(user) ⇒ Object
18 19 20 |
# File 'app/models/lesson.rb', line 18 def pending_siblings_for(user) topic.pending_lessons(user) end |
#structural_parent ⇒ Object
22 23 24 |
# File 'app/models/lesson.rb', line 22 def structural_parent topic end |
#used_in?(organization) ⇒ Boolean
14 15 16 |
# File 'app/models/lesson.rb', line 14 def used_in?(organization) guide.usage_in_organization(organization) == self end |