mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
refactoring
This commit is contained in:
parent
dad4790ccc
commit
9c0018d6fe
4 changed files with 6 additions and 8 deletions
|
@ -54,8 +54,8 @@ module Admin
|
|||
@domain.is_admin = true
|
||||
@domain.admin_status_update dp[:statuses]
|
||||
if @domain.update(dp)
|
||||
@domain.admin_store_statuses_history = @domain.statuses
|
||||
@domain.save
|
||||
# @domain.admin_store_statuses_history = @domain.statuses
|
||||
# @domain.save
|
||||
flash[:notice] = I18n.t('domain_updated')
|
||||
redirect_to [:admin, @domain]
|
||||
else
|
||||
|
|
|
@ -55,6 +55,4 @@ module Domain::RegistryLockable
|
|||
attached_obj_type: self.class.name
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
end
|
||||
|
|
|
@ -558,8 +558,8 @@ class Domain < ApplicationRecord
|
|||
# special handling for admin changing status
|
||||
def admin_status_update(update)
|
||||
# check for deleted status
|
||||
self.admin_store_statuses_history = statuses
|
||||
|
||||
update(admin_store_statuses_history: update)
|
||||
statuses.each do |s|
|
||||
unless update.include? s
|
||||
case s
|
||||
|
|
|
@ -17,11 +17,11 @@ class RegistrantUser < User
|
|||
Country.new(alpha2_code)
|
||||
end
|
||||
|
||||
def companies(company_register = nil)
|
||||
def companies(company_register = CompanyRegister::Client.new)
|
||||
return [] if ident.include?('-')
|
||||
|
||||
[OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'),
|
||||
OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')]
|
||||
company_register.representation_rights(citizen_personal_code: ident,
|
||||
citizen_country_code: country.alpha3)
|
||||
end
|
||||
|
||||
def contacts(representable: true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue