Sha256: 1cddfea16237d687d3a324b23d8bda7d8337c6b53e6a96036594596691867896
Contents?: true
Size: 842 Bytes
Versions: 15
Compression:
Stored size: 842 Bytes
Contents
# frozen_string_literal: true module PagesCore module ImagesHelper include DynamicImage::Helper def dynamic_image_tag(record_or_array, options = {}) super( record_or_array, extract_alt_text(record_or_array).merge(options) ) end def original_dynamic_image_tag(record_or_array, options = {}) super( record_or_array, extract_alt_text(record_or_array).merge(options) ) end def uncropped_dynamic_image_tag(record_or_array, options = {}) super( record_or_array, extract_alt_text(record_or_array).merge(options) ) end private def extract_alt_text(record_or_array) record = extract_dynamic_image_record(record_or_array) return {} unless record.alternative? { alt: record.alternative } end end end
Version data entries
15 entries across 15 versions & 1 rubygems