From 17e2c67acd77ddc58d70bea0ecbd6dec5ad11c0c Mon Sep 17 00:00:00 2001 From: wmcheng Date: Fri, 14 Jun 2019 00:22:48 +0800 Subject: [PATCH] Revert "Fix show issue if no enough info. provided." This reverts commit e1e90a83cf5b540c6c5d266987e445fc1662b7f3 --- app/controllers/property_hires_controller.rb | 60 ++++++++------------ 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/app/controllers/property_hires_controller.rb b/app/controllers/property_hires_controller.rb index ddc31cf..9ff91bd 100644 --- a/app/controllers/property_hires_controller.rb +++ b/app/controllers/property_hires_controller.rb @@ -69,51 +69,39 @@ class PropertyHiresController < ApplicationController "value" => property.note } end - if !property_hire.property_number.blank? - data << { - "header" => t("property_hire.property_number"), - "value" => property.property_number - } - end + data << { + "header" => t("property_hire.property_number"), + "value" => property.property_number + } data << { "header" => t("property_hire.can_be_hired"), "value" => (property.can_be_hired ? "Yes" : "No") } - if !property_hire.purchase_date.blank? - data << { - "header" => t("property_hire.purchase_date"), - "value" => property.purchase_date.strftime("%Y-%m-%d") - } - end + data << { + "header" => t("property_hire.purchase_date"), + "value" => property.purchase_date.strftime("%Y-%m-%d") + } if property.owners.empty? owners = property.other_owner else owners = property.owner_profiles.collect{|mp| mp.name}.join(",") end - if !property_hire.owners.blank? - data << { - "header" => t("property_hire.owners"), - "value" => owners - } - end - if !property_hire.owner_email.blank? - data << { - "header" => t("property_hire.owner_email"), - "value" => property.owner_email - } - end - if !property_hire.owner_phone.blank? - data << { - "header" => t("property_hire.owner_phone"), - "value" => property.owner_phone - } - end - if !property_hire.price.blank? - data << { - "header" => t("property_hire.price"), - "value" => property.price - } - end + data << { + "header" => t("property_hire.owners"), + "value" => owners + } + data << { + "header" => t("property_hire.owner_email"), + "value" => property.owner_email + } + data << { + "header" => t("property_hire.owner_phone"), + "value" => property.owner_phone + } + data << { + "header" => t("property_hire.price"), + "value" => property.price + } data << { "header" => t("property_hire.location"), "value" => property.get_location_name