Module: Course::Discussion::Topic::PostsConcern

Extended by:
ActiveSupport::Concern
Includes:
Post::OrderingConcern
Defined in:
app/models/concerns/course/discussion/topic/posts_concern.rb

Instance Method Summary collapse

Instance Method Details

#ordered_topologicallyObject

Retrieves the topological ordering of the posts associated with this topic.

Call +reload+ to reset the ordering.


15
16
17
# File 'app/models/concerns/course/discussion/topic/posts_concern.rb', line 15

def ordered_topologically
  @ordered_topologically ||= super
end

#reloadObject

Reloads the association.


7
8
9
10
# File 'app/models/concerns/course/discussion/topic/posts_concern.rb', line 7

def reload
  remove_instance_variable(:@ordered_topologically) if defined?(@ordered_topologically)
  super
end