mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Merge branch 'master' into registry-248
This commit is contained in:
commit
bdebfafe85
14 changed files with 154 additions and 71 deletions
|
@ -8,6 +8,7 @@ class DomainMailer < ApplicationMailer
|
||||||
|
|
||||||
@old_registrant = Registrant.find(old_registrant_id)
|
@old_registrant = Registrant.find(old_registrant_id)
|
||||||
@new_registrant = Registrant.find(new_registrant_id)
|
@new_registrant = Registrant.find(new_registrant_id)
|
||||||
|
@address_processing = Contact.address_processing?
|
||||||
|
|
||||||
return if whitelist_blocked?(@new_registrant.email)
|
return if whitelist_blocked?(@new_registrant.email)
|
||||||
mail(to: format(@new_registrant.email),
|
mail(to: format(@new_registrant.email),
|
||||||
|
@ -23,6 +24,7 @@ class DomainMailer < ApplicationMailer
|
||||||
|
|
||||||
@old_registrant = Registrant.find(old_registrant_id)
|
@old_registrant = Registrant.find(old_registrant_id)
|
||||||
@new_registrant = Registrant.find(new_registrant_id)
|
@new_registrant = Registrant.find(new_registrant_id)
|
||||||
|
@address_processing = Contact.address_processing?
|
||||||
|
|
||||||
return if whitelist_blocked?(@old_registrant.email)
|
return if whitelist_blocked?(@old_registrant.email)
|
||||||
mail(to: format(@old_registrant.email),
|
mail(to: format(@old_registrant.email),
|
||||||
|
|
|
@ -10,9 +10,11 @@ Nimi: <%= @new_registrant.name %><br>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %><br>
|
Epost: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %><br>
|
Tänav: <%= @new_registrant.street %><br>
|
||||||
Linn: <%= @new_registrant.city %><br>
|
Linn: <%= @new_registrant.city %><br>
|
||||||
Riik: <%= @new_registrant.country.name %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -31,9 +33,11 @@ Name: <%= @new_registrant.name %><br>
|
||||||
Business Registry code: <%= @new_registrant.ident %><br>
|
Business Registry code: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %><br>
|
E-mail: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %><br>
|
Street: <%= @new_registrant.street %><br>
|
||||||
City: <%= @new_registrant.city %><br>
|
City: <%= @new_registrant.city %><br>
|
||||||
Country: <%= @new_registrant.country.name %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -11,9 +11,11 @@ Nimi: <%= @new_registrant.name %>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %>
|
Äriregistrikood: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %>
|
Epost: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %>
|
Tänav: <%= @new_registrant.street %>
|
||||||
Linn: <%= @new_registrant.city %>
|
Linn: <%= @new_registrant.city %>
|
||||||
Riik: <%= @new_registrant.country.name %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -33,9 +35,11 @@ Name: <%= @new_registrant.name %>
|
||||||
Business Registry code: <%= @new_registrant.ident %>
|
Business Registry code: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %>
|
E-mail: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %>
|
Street: <%= @new_registrant.street %>
|
||||||
City: <%= @new_registrant.city %>
|
City: <%= @new_registrant.city %>
|
||||||
Country: <%= @new_registrant.country.name %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -10,9 +10,11 @@ Isikukood: <%= @new_registrant.ident %><br>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %><br>
|
Äriregistrikood: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %><br>
|
Epost: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %><br>
|
Tänav: <%= @new_registrant.street %><br>
|
||||||
Linn: <%= @new_registrant.city %><br>
|
Linn: <%= @new_registrant.city %><br>
|
||||||
Riik: <%= @new_registrant.country.name %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -31,9 +33,11 @@ Personal code: <%= @new_registrant.ident %><br>
|
||||||
Business Registry code: <%= @new_registrant.ident %><br>
|
Business Registry code: <%= @new_registrant.ident %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %><br>
|
E-mail: <%= @new_registrant.email %><br>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %><br>
|
Street: <%= @new_registrant.street %><br>
|
||||||
City: <%= @new_registrant.city %><br>
|
City: <%= @new_registrant.city %><br>
|
||||||
Country: <%= @new_registrant.country.name %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -11,9 +11,11 @@ Isikukood: <%= @new_registrant.ident %>
|
||||||
Äriregistrikood: <%= @new_registrant.ident %>
|
Äriregistrikood: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
Epost: <%= @new_registrant.email %>
|
Epost: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Tänav: <%= @new_registrant.street %>
|
Tänav: <%= @new_registrant.street %>
|
||||||
Linn: <%= @new_registrant.city %>
|
Linn: <%= @new_registrant.city %>
|
||||||
Riik: <%= @new_registrant.country.name %>
|
Riik: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti Sihtasutus
|
Eesti Interneti Sihtasutus
|
||||||
|
@ -33,9 +35,11 @@ Personal code: <%= @new_registrant.ident %>
|
||||||
Business Registry code: <%= @new_registrant.ident %>
|
Business Registry code: <%= @new_registrant.ident %>
|
||||||
<% end %>
|
<% end %>
|
||||||
E-mail: <%= @new_registrant.email %>
|
E-mail: <%= @new_registrant.email %>
|
||||||
|
<% if @address_processing -%>
|
||||||
Street: <%= @new_registrant.street %>
|
Street: <%= @new_registrant.street %>
|
||||||
City: <%= @new_registrant.city %>
|
City: <%= @new_registrant.city %>
|
||||||
Country: <%= @new_registrant.country.name %>
|
Country: <%= @new_registrant.country.name %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -4,9 +4,12 @@
|
||||||
.row
|
.row
|
||||||
.col-md-8
|
.col-md-8
|
||||||
= render 'registrar/contacts/form_partials/general', f: f
|
= render 'registrar/contacts/form_partials/general', f: f
|
||||||
|
|
||||||
|
- if address_processing?
|
||||||
.row
|
.row
|
||||||
.col-md-8
|
.col-md-8
|
||||||
= render 'registrar/contacts/form_partials/address', f: f
|
= render 'registrar/contacts/form_partials/address', f: f
|
||||||
|
|
||||||
- if !@contact.persisted?
|
- if !@contact.persisted?
|
||||||
.row
|
.row
|
||||||
.col-md-8
|
.col-md-8
|
||||||
|
|
|
@ -4,21 +4,21 @@
|
||||||
.panel-body
|
.panel-body
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
= f.label :street, t(:street)
|
= f.label :street, t(:street) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= f.text_field :street, class: 'form-control', required: address_processing?
|
= f.text_field :street, class: 'form-control', required: true
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
= f.label :city, t(:city)
|
= f.label :city, t(:city) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= f.text_field :city, class: 'form-control', required: address_processing?
|
= f.text_field :city, class: 'form-control', required: true
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
= f.label :zip, t(:zip)
|
= f.label :zip, t(:zip) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= f.text_field :zip, class: 'form-control', required: address_processing?
|
= f.text_field :zip, class: 'form-control', required: true
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
|
@ -28,10 +28,9 @@
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-3.control-label
|
.col-md-3.control-label
|
||||||
= f.label :country_code, t(:country)
|
= f.label :country_code, t(:country) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
- country_selected = f.object.persisted? ? f.object.country_code : 'EE'
|
- country_selected = f.object.persisted? ? f.object.country_code : 'EE'
|
||||||
= f.select(:country_code,
|
= f.select(:country_code, SortedCountry.all_options(country_selected),
|
||||||
SortedCountry.all_options(country_selected),
|
{ include_blank: true }, required: true)
|
||||||
{ include_blank: true },
|
|
||||||
required: address_processing?)
|
|
||||||
|
|
|
@ -25,13 +25,14 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
<contact:postalInfo> 1 Postal information container
|
<contact:postalInfo> 1 Postal information container
|
||||||
<contact:name> 1 Full name of the contact
|
<contact:name> 1 Full name of the contact
|
||||||
<contact:org> 0 Org is not supported and must be blank or missing
|
<contact:org> 0 Org is not supported and must be blank or missing
|
||||||
<contact:addr> 1 Address container
|
<contact:addr> 0-1 Address container, optional
|
||||||
<contact:street> 1-n Street name
|
<contact:street> 0-3 Street name
|
||||||
<contact:city> 1 City name
|
<contact:city> 1 City name
|
||||||
<contact:sp> 0-1 State or province
|
<contact:sp> 0-1 State or province
|
||||||
<contact:pc> 1 Postal code
|
<contact:pc> 0-1 Postal code
|
||||||
<contact:cc> 1 Country code, 2 letters uppercase, in ISO_3166-1 alpha 2
|
<contact:cc> 1 Country code, 2 letters uppercase, in ISO_3166-1 alpha 2
|
||||||
<contact:voice> 1 Phone number in format \+ddd.d+
|
<contact:voice> 1 Phone number in format \+ddd.d+
|
||||||
|
<contact:fax> 0 Fax is not supported and must be blank or missing
|
||||||
<contact:email> 1 E-mail
|
<contact:email> 1 E-mail
|
||||||
<extension> 1
|
<extension> 1
|
||||||
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
<eis:extdata> 1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd"
|
||||||
|
@ -60,12 +61,13 @@ More info: https://en.wikipedia.org/wiki/Latin_script_in_Unicode
|
||||||
<contact:name> 0-1 Full name of the contact
|
<contact:name> 0-1 Full name of the contact
|
||||||
<contact:org> 0 Org is not supported and must be blank or missing
|
<contact:org> 0 Org is not supported and must be blank or missing
|
||||||
<contact:addr> 0-1 Address container
|
<contact:addr> 0-1 Address container
|
||||||
<contact:street> 0-n Street name
|
<contact:street> 0-3 Street name
|
||||||
<contact:city> 0-1 City name
|
<contact:city> 1 City name
|
||||||
<contact:sp> 0-1 State or province
|
<contact:sp> 0-1 State or province
|
||||||
<contact:pc> 0-1 Postal code
|
<contact:pc> 0-1 Postal code
|
||||||
<contact:cc> 0-1 Country code, 2 letters uppercase, in ISO_3166-1 alpha 2
|
<contact:cc> 1 Country code, 2 letters uppercase, in ISO_3166-1 alpha 2
|
||||||
<contact:voice> 0-1 Phone number in format \+ddd.d+
|
<contact:voice> 0-1 Phone number in format \+ddd.d+
|
||||||
|
<contact:fax> 0 Fax is not supported and must be blank or missing
|
||||||
<contact:email> 0-1 E-mail
|
<contact:email> 0-1 E-mail
|
||||||
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
||||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||||
|
|
|
@ -21,5 +21,19 @@ FactoryGirl.define do
|
||||||
ident_type 'org'
|
ident_type 'org'
|
||||||
ident '12345678' # valid reg no for .ee
|
ident '12345678' # valid reg no for .ee
|
||||||
end
|
end
|
||||||
|
|
||||||
|
factory :contact_with_address do
|
||||||
|
street 'test'
|
||||||
|
city 'test'
|
||||||
|
zip 12345
|
||||||
|
country_code 'EE'
|
||||||
|
end
|
||||||
|
|
||||||
|
factory :contact_without_address do
|
||||||
|
street nil
|
||||||
|
city nil
|
||||||
|
zip nil
|
||||||
|
country_code nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,5 +4,7 @@ FactoryGirl.define do
|
||||||
|
|
||||||
factory :registrant_private_entity, class: Registrant, parent: :contact_private_entity
|
factory :registrant_private_entity, class: Registrant, parent: :contact_private_entity
|
||||||
factory :registrant_legal_entity, class: Registrant, parent: :contact_legal_entity
|
factory :registrant_legal_entity, class: Registrant, parent: :contact_legal_entity
|
||||||
|
factory :registrant_with_address, class: Registrant, parent: :contact_with_address
|
||||||
|
factory :registrant_without_address, class: Registrant, parent: :contact_without_address
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
require_relative 'rails_helper'
|
require_relative 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe 'FactoryGirl', db: true do
|
RSpec.describe 'FactoryGirl', db: true do
|
||||||
|
before :example do
|
||||||
|
allow(Contact).to receive(:address_processing?).and_return(false)
|
||||||
|
end
|
||||||
|
|
||||||
it 'lints factories' do
|
it 'lints factories' do
|
||||||
FactoryGirl.lint
|
FactoryGirl.lint
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,59 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe DomainMailer do
|
RSpec.describe DomainMailer do
|
||||||
|
describe '#registrant_updated_notification_for_new_registrant', db: true do
|
||||||
|
subject(:message) { described_class.registrant_updated_notification_for_new_registrant(55, 55, 55, true) }
|
||||||
|
|
||||||
|
context 'when contact address processing is enabled' do
|
||||||
|
before :example do
|
||||||
|
allow(Contact).to receive(:address_processing?).and_return(true)
|
||||||
|
create(:domain, id: 55)
|
||||||
|
create(:registrant_with_address, id: 55)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'sends message' do
|
||||||
|
expect { message.deliver }.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when contact address processing is disabled' do
|
||||||
|
before :example do
|
||||||
|
allow(Contact).to receive(:address_processing?).and_return(false)
|
||||||
|
create(:domain, id: 55)
|
||||||
|
create(:registrant_without_address, id: 55)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'sends message' do
|
||||||
|
expect { message.deliver }.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#registrant_updated_notification_for_old_registrant', db: true do
|
||||||
|
subject(:message) { described_class.registrant_updated_notification_for_old_registrant(55, 55, 55, true) }
|
||||||
|
|
||||||
|
context 'when contact address processing is enabled' do
|
||||||
|
before :example do
|
||||||
|
allow(Contact).to receive(:address_processing?).and_return(true)
|
||||||
|
create(:domain, id: 55)
|
||||||
|
create(:registrant_with_address, id: 55)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'sends message' do
|
||||||
|
expect { message.deliver }.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when contact address processing is disabled' do
|
||||||
|
before :example do
|
||||||
|
allow(Contact).to receive(:address_processing?).and_return(false)
|
||||||
|
create(:domain, id: 55)
|
||||||
|
create(:registrant_without_address, id: 55)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'sends message' do
|
||||||
|
expect { message.deliver }.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
38
spec/views/registrar/contacts/_form.haml_spec.rb
Normal file
38
spec/views/registrar/contacts/_form.haml_spec.rb
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'registrar/contacts/_form' do
|
||||||
|
let(:contact) { instance_spy(Depp::Contact) }
|
||||||
|
|
||||||
|
before :example do
|
||||||
|
allow(view).to receive(:f).and_return(ActionView::Helpers::FormBuilder.new(:contact, contact, view, {}))
|
||||||
|
assign(:contact, contact)
|
||||||
|
|
||||||
|
stub_template 'registrar/shared/_error_messages' => ''
|
||||||
|
stub_template 'registrar/contacts/form_partials/_general' => ''
|
||||||
|
stub_template 'registrar/contacts/form_partials/_address' => 'address info'
|
||||||
|
stub_template 'registrar/contacts/form_partials/_code' => ''
|
||||||
|
stub_template 'registrar/contacts/form_partials/_legal_document' => ''
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when address processing is enabled' do
|
||||||
|
before do
|
||||||
|
allow(view).to receive(:address_processing?).and_return(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has address' do
|
||||||
|
render
|
||||||
|
expect(rendered).to have_text('address info')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when address processing is disabled' do
|
||||||
|
before do
|
||||||
|
allow(view).to receive(:address_processing?).and_return(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has no address' do
|
||||||
|
render
|
||||||
|
expect(rendered).to_not have_text('address info')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,51 +0,0 @@
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
module RequiredAddressFieldsHelper
|
|
||||||
def define_field_examples(attr_name)
|
|
||||||
describe "#{attr_name} field" do
|
|
||||||
let(:field) { page.find("[name='depp_contact[#{attr_name}]']") }
|
|
||||||
|
|
||||||
context 'when address processing is enabled' do
|
|
||||||
before do
|
|
||||||
allow(view).to receive(:address_processing?).and_return(true)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'is required' do
|
|
||||||
render
|
|
||||||
expect(field[:required]).to eq('required')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when address processing is disabled' do
|
|
||||||
before do
|
|
||||||
allow(view).to receive(:address_processing?).and_return(false)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'is optional' do
|
|
||||||
render
|
|
||||||
expect(field[:required]).to be_nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
RSpec.describe 'registrar/contacts/form_partials/_address' do
|
|
||||||
extend RequiredAddressFieldsHelper
|
|
||||||
let(:contact) { instance_spy(Depp::Contact) }
|
|
||||||
|
|
||||||
before do
|
|
||||||
allow(view).to receive(:f).and_return(ActionView::Helpers::FormBuilder.new(:depp_contact, contact, view, {}))
|
|
||||||
end
|
|
||||||
|
|
||||||
required_address_attributes = %i(
|
|
||||||
street
|
|
||||||
city
|
|
||||||
zip
|
|
||||||
country_code
|
|
||||||
)
|
|
||||||
|
|
||||||
required_address_attributes.each do |attr_name|
|
|
||||||
define_field_examples(attr_name)
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Add table
Add a link
Reference in a new issue