app/helper/pageflow/text_page/image_helper.rb in pageflow-text-page-0.3.0 vs app/helper/pageflow/text_page/image_helper.rb in pageflow-text-page-1.0.0

- old
+ new

@@ -26,12 +26,18 @@ else '#' end end - def content_image_present_css_class(id) - image = Pageflow::ImageFile.find_by_id(id) - image ? '' : 'no_background_image' + def background_asset_present_css_class(configuration) + file = + if configuration['background_type'] == 'video' + Pageflow::VideoFile.find_by_id(configuration['video_file_id']) + else + Pageflow::ImageFile.find_by_id(configuration['background_image_id']) + end + + file ? '' : 'no_background_asset' end end end end