مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-03-03 14:24:06 +00:00
style(rubocop): fix all safe auto correctable offenses
هذا الالتزام موجود في:
@@ -18,10 +18,10 @@ class UserInvite < ApplicationRecord
|
||||
|
||||
include HasUUID
|
||||
|
||||
validates :email_address, :presence => true, :uniqueness => true, :format => {:with => /@/, :allow_blank => true}
|
||||
validates :email_address, presence: true, uniqueness: true, format: { with: /@/, allow_blank: true }
|
||||
|
||||
has_many :organization_users, :dependent => :destroy, :as => :user
|
||||
has_many :organizations, :through => :organization_users
|
||||
has_many :organization_users, dependent: :destroy, as: :user
|
||||
has_many :organizations, through: :organization_users
|
||||
|
||||
default_value :expires_at, -> { 7.days.from_now }
|
||||
|
||||
@@ -41,16 +41,16 @@ class UserInvite < ApplicationRecord
|
||||
|
||||
def accept(user)
|
||||
transaction do
|
||||
self.organization_users.each do |ou|
|
||||
ou.update(:user => user) || ou.destroy
|
||||
organization_users.each do |ou|
|
||||
ou.update(user: user) || ou.destroy
|
||||
end
|
||||
self.organization_users.reload
|
||||
self.destroy
|
||||
organization_users.reload
|
||||
destroy
|
||||
end
|
||||
end
|
||||
|
||||
def reject
|
||||
self.destroy
|
||||
destroy
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم