mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
Contact code generation
This commit is contained in:
parent
2d2a12b7d0
commit
aecb919610
3 changed files with 10 additions and 3 deletions
|
@ -78,6 +78,12 @@ class Contact < ActiveRecord::Base
|
|||
auth_info == pw
|
||||
end
|
||||
|
||||
# generate random id for contact
|
||||
#
|
||||
def generate_code
|
||||
self.code = SecureRandom.hex(4)
|
||||
end
|
||||
|
||||
# Find a way to use self.domains with contact
|
||||
def domains_owned
|
||||
Domain.where(owner_contact_id: id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue