Skip to content

Commit

Permalink
Change dynamic seo creation fields retrieve logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nirosh ubeysinghe committed Sep 23, 2020
1 parent 66142d7 commit 17767fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fi_seo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,23 @@ def title_value
if self&.dynamic_seo&.title.present?
self.dynamic_seo.title
else
self.send(self.class.seoable_fields.first)
self.send(self.class.seoable_fields.first) || ''
end
end

def description_value
if self&.dynamic_seo&.description.present?
self.dynamic_seo.description
else
self.send(self.class.seoable_fields.second)
self.send(self.class.seoable_fields.second) || ''
end
end

def keywords_value
if self&.dynamic_seo&.keywords.present?
self.dynamic_seo.keywords
else
self.send(self.class.seoable_fields.third)
self.send(self.class.seoable_fields.third) || ''
end
end
end
Expand Down

0 comments on commit 17767fd

Please sign in to comment.