Sha256: f23932dfbbf3b8bd20f0317fec950288a330f70cd35baca6704f13d6b2892ccc
Contents?: true
Size: 575 Bytes
Versions: 71
Compression:
Stored size: 575 Bytes
Contents
# frozen_string_literal: true module Renalware module ArticleHelper # Renders: # <article> # <header> # <h1>[title]</h1> # </header> # [yielded content] # </article> def article_tag(title = nil, options = nil, &block) output = tag(:article, options, true) if title.present? output.safe_concat( content_tag("header") do content_tag("h1", title) end ) end output.concat(capture(&block)) if block_given? output.safe_concat("</article>") end end end
Version data entries
71 entries across 71 versions & 1 rubygems