Move account creation from registrar model to admin/registrars controller

This commit is contained in:
Artur Beljajev 2016-12-28 15:08:09 +02:00
parent c1cb598da1
commit 0a6b2fe19a
2 changed files with 7 additions and 7 deletions

View file

@ -57,11 +57,6 @@ class Registrar < ActiveRecord::Base
RegenerateRegistrarWhoisesJob.enqueue id
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