Convert array to string interpolation, use 'unless' rather than 'if x !='

This commit is contained in:
Kaelig
2021-05-14 07:50:04 -07:00
parent b1cdd31858
commit be02670a54

View File

@@ -18,11 +18,7 @@ module ShopFilter
end
def stylesheet_tag(url, media = "all")
html = []
html << %(<link href="#{url}" rel="stylesheet")
html << %(media="#{media}") if media != "all"
html << "/>"
html.join(" ")
%(<link href="#{url}" rel="stylesheet" #{%(media="#{media}" ) unless media == 'all'}/>)
end
def link_to(link, url, title = "")