Sha256: e8e0293b1b58a0cb78e0f28cc303a860ad696c37296e1e835d77df83fa26df25

Contents?: true

Size: 358 Bytes

Versions: 44

Compression:

Stored size: 358 Bytes

Contents

module Hyrax
  module ContentBlockHelperBehavior
    def displayable_content_block(content_block, **options)
      return unless display_content_block? content_block
      content_tag :div, raw(content_block.value), options
    end

    def display_content_block?(content_block)
      content_block.present? && content_block.value.present?
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.5 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.4 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.3 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.9.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.8.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.7.2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.7.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.7.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.6.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.rc1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.beta3 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.5.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.5.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.beta2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.4.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.beta1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-2.4.0 app/helpers/hyrax/content_block_helper_behavior.rb