app/models/plan.rb
# The owner (aka :creator) of the project
#
# Returns User
# Returns nil
The owner (aka :creator) of the project
Returns User
Returns nil
The owner ( aka : creator ) of the project Returns User Returns nil
def owner
    r = roles.select { |rr| rr.active && rr.administrator }
             .min { |a, b| a.created_at <=> b.created_at }
    r.nil? ? nil : r.user
  end
def owner r = roles . select { | rr | rr . active && rr . administrator } . min { | a , b | a . created_at <=> b . created_at } r . nil? ? nil : r . user end
The owner (aka :creator) of the project
Returns User
Returns nil
The owner ( aka : creator ) of the project Returns User Returns nil