app/models/plan.rb
# The creator, administrator and editors
#
# Returns ActiveRecord::Relation
The creator, administrator and editors
Returns ActiveRecord::Relation
The creator administrator and editors Returns ActiveRecord :: Relation
def authors
    roles.select { |r| r.active && r.editor }.map(&:user).uniq
  end
def authors roles . select { | r | r . active && r . editor } . map ( & :user ) . uniq end
The creator, administrator and editors
Returns ActiveRecord::Relation
The creator administrator and editors Returns ActiveRecord :: Relation
# We only need to search for :editor in the bitflag # since :creator and :administrator include :editor rights