mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
parent
f2739b79fb
commit
455257bf51
3 changed files with 5 additions and 4 deletions
|
@ -12,7 +12,6 @@ class Invitation < ApplicationRecord
|
|||
|
||||
scope :pending, -> { where(accepted_at: nil).where("expires_at > ?", Time.current) }
|
||||
scope :accepted, -> { where.not(accepted_at: nil) }
|
||||
scope :most_recent_for_email, ->(email) { where(email: email).order(accepted_at: :desc).first }
|
||||
|
||||
def pending?
|
||||
accepted_at.nil? && expires_at > Time.current
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue