use guardian_address_street1 for old guardian_address

This commit is contained in:
bilal
2020-06-17 09:44:34 +02:00
parent d165f5fd36
commit ba0efd7233
10 changed files with 5 additions and 28 deletions

View File

@@ -78,7 +78,7 @@ class AppearanceReleasesController < ApplicationController
end
def appearance_release_params
params.require(:appearance_release).permit(:contract, :guardian_address_old, :guardian_first_name, :guardian_last_name, :guardian_phone, :guardian_photo, :guardian_email, :minor,
params.require(:appearance_release).permit(:contract, :guardian_address_street1, :guardian_first_name, :guardian_last_name, :guardian_phone, :guardian_photo, :guardian_email, :minor,
:person_address_street1, :person_first_name, :person_last_name, :person_phone, :person_email, :person_photo,
:applicable_medium_id, :applicable_medium_text,
:territory_id, :territory_text,

View File

@@ -107,19 +107,6 @@ class AppearanceRelease < ApplicationRecord
person_phone
]
def guardian_address
return self.guardian_address_old if self.guardian_address_old.present?
Address.new(
self.guardian_address_street1,
self.guardian_address_street2,
self.guardian_address_city,
self.guardian_address_state,
self.guardian_address_zip,
self.guardian_address_country
).to_s(format: :full)
end
# All releases must respond to the following messages
def name
person_name

View File

@@ -23,7 +23,7 @@
<%= form.phone_field :guardian_phone, wrapper_class: "col-sm-6" %>
</div>
<div class="form-row">
<%= form.text_field :guardian_address_old, wrapper_class: "col-sm-6" %>
<%= form.text_field :guardian_address_street1, wrapper_class: "col-sm-6" %>
</div>
</div>
<% end %>