Skip to content

Commit

Permalink
Merge pull request #6 from niroshubey966/master
Browse files Browse the repository at this point in the history
Change data retrieval logic
  • Loading branch information
randikabanura authored Sep 23, 2020
2 parents a9a08ab + 861ba2e commit efdc75d
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 @@ -189,23 +189,23 @@ def canonical_url
end

def title_value
if self&.dynamic_seo&.title.present?
if self&.dynamic_seo&.title
self.dynamic_seo.title
else
self.send(self.class.seoable_fields.first) || ''
end
end

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

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

0 comments on commit efdc75d

Please sign in to comment.