Commit d4933c60819f204e661e232c0d244ffba09d50d0
1 parent
35fba789
Exists in
master
and in
22 other branches
ActionItem866: removing code duplication
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/profile.rb
@@ -465,7 +465,7 @@ class Profile < ActiveRecord::Base | @@ -465,7 +465,7 @@ class Profile < ActiveRecord::Base | ||
465 | end | 465 | end |
466 | 466 | ||
467 | def custom_header_expanded | 467 | def custom_header_expanded |
468 | - header = self[:custom_header] || environment.custom_header | 468 | + header = custom_header |
469 | if header | 469 | if header |
470 | if self.respond_to?(:name) && header.include?('{name}') | 470 | if self.respond_to?(:name) && header.include?('{name}') |
471 | header.gsub('{name}', self.name) | 471 | header.gsub('{name}', self.name) |
@@ -480,7 +480,7 @@ class Profile < ActiveRecord::Base | @@ -480,7 +480,7 @@ class Profile < ActiveRecord::Base | ||
480 | end | 480 | end |
481 | 481 | ||
482 | def custom_footer_expanded | 482 | def custom_footer_expanded |
483 | - footer = self[:custom_footer] || environment.custom_footer | 483 | + footer = custom_footer |
484 | if footer | 484 | if footer |
485 | %w[contact_person contact_email contact_phone location address economic_activity city state country zip_code].each do |att| | 485 | %w[contact_person contact_email contact_phone location address economic_activity city state country zip_code].each do |att| |
486 | if self.respond_to?(att) && footer.match(/\{[^{]*#{att}\}/) | 486 | if self.respond_to?(att) && footer.match(/\{[^{]*#{att}\}/) |