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

Version Path
renalware-core-2.0.0.pre.beta11 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta10 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta9 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta8 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta7 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta6 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta5 app/helpers/renalware/article_helper.rb
renalware-core-2.0.0.pre.beta4 app/helpers/renalware/article_helper.rb