mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Add account after registrar create
This commit is contained in:
parent
c1211a0ac5
commit
f7a4dee1b6
5 changed files with 16 additions and 4 deletions
|
@ -53,6 +53,11 @@ class Registrar < ActiveRecord::Base
|
|||
whois_records.map(&:save) # slow currently
|
||||
end
|
||||
|
||||
after_create :create_cash_account
|
||||
def create_cash_account
|
||||
accounts.create(account_type: Account::CASH, currency: 'EUR')
|
||||
end
|
||||
|
||||
class << self
|
||||
def search_by_query(query)
|
||||
res = search(name_or_reg_no_cont: query).result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue