mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Merge pull request #1517 from internetee/1516-no-method-error-on-domain-registration
Registrar: Permit & turn ActiveController::Parameters to hash on domain create
This commit is contained in:
commit
56f1e38b3c
1 changed files with 8 additions and 1 deletions
|
@ -85,7 +85,7 @@ class Registrar
|
||||||
|
|
||||||
def create
|
def create
|
||||||
authorize! :create, Depp::Domain
|
authorize! :create, Depp::Domain
|
||||||
@domain_params = params[:domain]
|
@domain_params = domain_params.to_h
|
||||||
@data = @domain.create(@domain_params)
|
@data = @domain.create(@domain_params)
|
||||||
|
|
||||||
if response_ok?
|
if response_ok?
|
||||||
|
@ -187,5 +187,12 @@ class Registrar
|
||||||
:valid_to_lteq,
|
:valid_to_lteq,
|
||||||
:s)
|
:s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def domain_params
|
||||||
|
params.require(:domain).permit(:name, :period, :registrant, :registrant_helper, :reserved_pw,
|
||||||
|
:legal_document, contacts_attributes: {},
|
||||||
|
nameservers_attributes: {},
|
||||||
|
dnskeys_attributes: {})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue