From d4933c60819f204e661e232c0d244ffba09d50d0 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 22 Dec 2008 14:17:17 -0300 Subject: [PATCH] ActionItem866: removing code duplication --- app/models/profile.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/profile.rb b/app/models/profile.rb index 060564d..c296425 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -465,7 +465,7 @@ class Profile < ActiveRecord::Base end def custom_header_expanded - header = self[:custom_header] || environment.custom_header + header = custom_header if header if self.respond_to?(:name) && header.include?('{name}') header.gsub('{name}', self.name) @@ -480,7 +480,7 @@ class Profile < ActiveRecord::Base end def custom_footer_expanded - footer = self[:custom_footer] || environment.custom_footer + footer = custom_footer if footer %w[contact_person contact_email contact_phone location address economic_activity city state country zip_code].each do |att| if self.respond_to?(att) && footer.match(/\{[^{]*#{att}\}/) -- libgit2 0.21.2