Skip to content

Commit

Permalink
Permit & turn ActiveController::Parameters to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
karlerikounapuu committed Feb 6, 2020
1 parent e377681 commit 3db4931
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/controllers/registrar/domains_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def new

def create
authorize! :create, Depp::Domain
@domain_params = params[:domain]
@domain_params = domain_params.to_h
@data = @domain.create(@domain_params)

if response_ok?
Expand Down Expand Up @@ -187,5 +187,11 @@ def search_params
:valid_to_lteq,
:s)
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

0 comments on commit 3db4931

Please sign in to comment.