Skip to content
Browse files

keywords_tag, dexcription_tag and copyright_tag will now only render …

…the tag if there's content for the value
  • Loading branch information...
1 parent e34584b commit 8144883a3a13fab9a71927fb6f92287b514adec2 @justinfrench committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/lovely_layouts.rb
View
9 lib/lovely_layouts.rb
@@ -17,7 +17,8 @@ def description(string)
end
def description_tag(default='')
- tag(:meta, :name => "description", :content => @content_for_description || default)
+ content = @content_for_description || default
+ tag(:meta, :name => "description", :content => content) unless content.blank?
end
@@ -26,7 +27,8 @@ def keywords(string)
end
def keywords_tag(default='')
- tag(:meta, :name => "keywords", :content => @content_for_keywords || default)
+ content = @content_for_keywords || default
+ tag(:meta, :name => "keywords", :content => content) unless content.blank?
end
@@ -35,7 +37,8 @@ def copyright(string)
end
def copyright_tag(default='')
- tag(:meta, :name => "copyright", :content => @content_for_copyright || default)
+ content = @content_for_copyright || default
+ tag(:meta, :name => "copyright", :content => content) unless content.blank?
end

0 comments on commit 8144883

Please sign in to comment.
Something went wrong with that request. Please try again.