mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Let domain to to draft status
This commit is contained in:
parent
e9e1e057f5
commit
7f26c8c769
6 changed files with 32 additions and 14 deletions
|
@ -3,8 +3,20 @@ module Epp::DomainsHelper
|
|||
Domain.transaction do
|
||||
@domain = Domain.new(domain_create_params)
|
||||
|
||||
handle_errors(@domain) and return unless @domain.parse_and_attach_domain_dependencies(@ph, parsed_frame)
|
||||
handle_errors(@domain) and return unless @domain.save
|
||||
@domain.attach_owner_contact(@ph[:registrant]) if @ph[:registrant]
|
||||
@domain.save
|
||||
@domain.parse_and_attach_domain_dependencies(parsed_frame)
|
||||
@domain.all_dependencies_valid?
|
||||
|
||||
if @domain.errors.any?
|
||||
handle_errors(@domain)
|
||||
raise ActiveRecord::Rollback and return
|
||||
end
|
||||
|
||||
unless @domain.save
|
||||
handle_errors(@domain)
|
||||
raise ActiveRecord::Rollback and return
|
||||
end
|
||||
|
||||
render '/epp/domains/create'
|
||||
end
|
||||
|
@ -40,7 +52,7 @@ module Epp::DomainsHelper
|
|||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
|
||||
@domain.parse_and_attach_domain_dependencies(@ph, parsed_frame.css('add'))
|
||||
@domain.parse_and_attach_domain_dependencies(parsed_frame.css('add'))
|
||||
@domain.parse_and_detach_domain_dependencies(parsed_frame.css('rem'))
|
||||
@domain.parse_and_update_domain_dependencies(parsed_frame.css('chg'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue