Sha256: e1adaa92cd49a4924621ecce2a1da88514b51359fd11413c478880ea58cb23bb
Contents?: true
Size: 558 Bytes
Versions: 27
Compression:
Stored size: 558 Bytes
Contents
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".freeze) do content_tag("h1".freeze, title) end ) end output.concat(capture(&block)) if block_given? output.safe_concat("</article>") end end end
Version data entries
27 entries across 27 versions & 1 rubygems