app/models/concerns/memberships/base.rb in bullet_train-1.2.4 vs app/models/concerns/memberships/base.rb in bullet_train-1.2.5
- old
+ new
@@ -23,9 +23,11 @@
user.current_team = nil
user.save
end
end
+ scope :excluding_platform_agents, -> { where(platform_agent_of: nil) }
+ scope :platform_agents, -> { where.not(platform_agent_of: nil) }
scope :current_and_invited, -> { includes(:invitation).where("user_id IS NOT NULL OR invitations.id IS NOT NULL").references(:invitation) }
scope :current, -> { where("user_id IS NOT NULL") }
scope :tombstones, -> { includes(:invitation).where("user_id IS NULL AND invitations.id IS NULL AND platform_agent IS FALSE").references(:invitation) }
# TODO Probably we can provide a way for gem packages to define these kinds of extensions.