Make nostr pubkey unique globally
This commit is contained in:
parent
9cf309aaa8
commit
beaafa5d7e
@ -36,7 +36,7 @@ class User < ApplicationRecord
|
|||||||
validates_length_of :display_name, minimum: 3, maximum: 35, allow_blank: true,
|
validates_length_of :display_name, minimum: 3, maximum: 35, allow_blank: true,
|
||||||
if: -> { defined?(@display_name) }
|
if: -> { defined?(@display_name) }
|
||||||
|
|
||||||
validates_uniqueness_of :nostr_pubkey, scope: :ou, allow_blank: true
|
validates_uniqueness_of :nostr_pubkey, allow_blank: true
|
||||||
|
|
||||||
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
||||||
scope :pending, -> { where(confirmed_at: nil) }
|
scope :pending, -> { where(confirmed_at: nil) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user