Sha256: 8960049e3fd4f82da1ef55eab9f9b23c9fa772f67f455e02cbc059043406c935
Contents?: true
Size: 562 Bytes
Versions: 8
Compression:
Stored size: 562 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) unless title.blank? 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
8 entries across 8 versions & 1 rubygems