mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
Convert array to string interpolation, use 'unless' rather than 'if x !='
This commit is contained in:
@@ -18,11 +18,7 @@ module ShopFilter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def stylesheet_tag(url, media = "all")
|
def stylesheet_tag(url, media = "all")
|
||||||
html = []
|
%(<link href="#{url}" rel="stylesheet" #{%(media="#{media}" ) unless media == 'all'}/>)
|
||||||
html << %(<link href="#{url}" rel="stylesheet")
|
|
||||||
html << %(media="#{media}") if media != "all"
|
|
||||||
html << "/>"
|
|
||||||
html.join(" ")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_to(link, url, title = "")
|
def link_to(link, url, title = "")
|
||||||
|
|||||||
Reference in New Issue
Block a user