mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Fixed the admin-part of contact address
This commit is contained in:
parent
31e92df6f6
commit
7ec06a4ade
8 changed files with 33 additions and 49 deletions
|
@ -9,8 +9,7 @@ class Admin::ContactsController < ApplicationController
|
|||
|
||||
def new
|
||||
@contact = Contact.new
|
||||
@contact.build_local_address
|
||||
@contact.build_international_address
|
||||
@contact.build_address
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -56,8 +55,7 @@ class Admin::ContactsController < ApplicationController
|
|||
end
|
||||
|
||||
def contact_params
|
||||
params.require(:contact).permit( :email, :phone, :fax, :ident_type, :ident, :auth_info,
|
||||
local_address_attributes: [:city, :street, :zip, :street2, :street3, :name, :org_name, :country_id],
|
||||
international_address_attributes: [:city, :street, :zip, :street2, :street3, :name, :org_name, :country_id])
|
||||
params.require(:contact).permit( :email, :phone, :fax, :ident_type, :ident, :auth_info, :name, :org_name,
|
||||
address_attributes: [:city, :street, :zip, :street2, :street3, :country_id])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue