Sha256: a75f97e6fcc0d08fcac4363c43d8939df237cbb4fc7095a21f84d574153a9814
Contents?: true
Size: 626 Bytes
Versions: 30
Compression:
Stored size: 626 Bytes
Contents
module SiblingsNavigation def next_for(user) user.pending_siblings_at(self).select { |it| it.number > number }.sort_by(&:number).first end def restart(user) user.pending_siblings_at(self).sort_by(&:number).first end def siblings structural_parent.structural_children end def pending_siblings_for(user, organization=Organization.current) siblings.reject { |it| it.progress_for(user, organization).completed? } end # Names def navigable_name "#{number}. #{name}" end # Answers a - maybe empty - list of pending siblings for the given user #required :pending_siblings_for end
Version data entries
30 entries across 30 versions & 1 rubygems