change code to take new filenames
This commit is contained in:
@ -7,7 +7,7 @@ module Merged
|
||||
def bg(section , clazz = "")
|
||||
attributes = {class: clazz}
|
||||
return attributes if section.image.blank?
|
||||
img = asset_url( section.image.assert_name )
|
||||
img = asset_url( section.image.asset_name )
|
||||
attributes["style"] = "background-image: url('#{img}');"
|
||||
if(section.option("fixed") == "on")
|
||||
attributes[:class] = attributes[:class] + " bg-fixed"
|
||||
@ -18,7 +18,8 @@ module Merged
|
||||
# works for with sections and cards that respond to .image
|
||||
def image_for(element , classes = "")
|
||||
return "" if element.image.blank?
|
||||
image_tag(element.image.assert_name , class: classes)
|
||||
image = element.image
|
||||
image_tag(image.asset_name , alt: image.name , class: classes )
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user