Module: Hyrax::ContentBlockHelperBehavior
- Included in:
- ContentBlockHelper
- Defined in:
- app/helpers/hyrax/content_block_helper_behavior.rb
Instance Method Summary collapse
- #display_content_block?(content_block) ⇒ Boolean
- #displayable_content_block(content_block, **options) ⇒ Object
Instance Method Details
#display_content_block?(content_block) ⇒ Boolean
9 10 11 |
# File 'app/helpers/hyrax/content_block_helper_behavior.rb', line 9 def display_content_block?(content_block) content_block.present? && content_block.value.present? end |
#displayable_content_block(content_block, **options) ⇒ Object
4 5 6 7 |
# File 'app/helpers/hyrax/content_block_helper_behavior.rb', line 4 def displayable_content_block(content_block, **) return unless display_content_block? content_block tag.div(raw(content_block.value), **) end |