lots of name fixes to get views to work in the app

This commit is contained in:
2022-11-29 01:13:05 +02:00
parent d063f58636
commit 8ddc7a01c8
30 changed files with 49 additions and 231 deletions

View File

@ -2,16 +2,16 @@ module Merged
module ViewHelper
# section should be hash with at least 'template' key
def find_template(section)
"sections/" + section["template"]
"merged/view/" + section["template"]
end
def bg(section)
#{'background-image' => url('#{image_url('merge/' + section['image'])}')}
img = image_url "merge/house.jpg"
puts "--#{Image.root}/#{section['image']}--"
img = asset_url( "#{Image.root}/#{section['image']}" )
"background-image: url('#{img}');"
end
def image_for(section , classes)
image_tag("merge/#{section['image']}" , class: classes)
image_tag("#{Image.root}/#{section['image']}" , class: classes)
end
def has_button(section)
section['button']