Sha256: b955f0475ef647e5fe91a6d82c0aa6e9944f4b6563cf02c4dcbff4eee6b6026d

Contents?: true

Size: 378 Bytes

Versions: 17

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module ContentBlockHelperBehavior
    def displayable_content_block(content_block, **options)
      return unless display_content_block? content_block
      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

17 entries across 17 versions & 1 rubygems

Version Path
hyrax-3.6.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-4.0.0.rc1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.5.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-4.0.0.beta2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.4.2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-4.0.0.beta1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.4.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.4.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.3.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.2.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.1.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.2 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.1 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.rc4 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.rc3 app/helpers/hyrax/content_block_helper_behavior.rb
hyrax-3.0.0.pre.rc2 app/helpers/hyrax/content_block_helper_behavior.rb