mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Made contact accept address as nested attribute
This commit is contained in:
parent
27ca5714cd
commit
1349abbbc7
3 changed files with 20 additions and 30 deletions
|
@ -9,6 +9,8 @@ class Contact < ActiveRecord::Base
|
|||
belongs_to :created_by, class_name: 'EppUser', foreign_key: :created_by_id
|
||||
belongs_to :updated_by, class_name: 'EppUser', foreign_key: :updated_by_id
|
||||
|
||||
accepts_nested_attributes_for :address
|
||||
|
||||
validates_presence_of :code, :name, :phone, :email, :ident
|
||||
|
||||
validate :ident_must_be_valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue