Sha256: 0179e0e6793333b1005a0b0d5409c48399de6609db259aa7b34778389e9b50bc

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

require 'action_view'

module Bh
  module BaseHelper
    include ActionView::Helpers::TagHelper # for content_tag
    include ActionView::Context # for capture
    include ActionView::Helpers::OutputSafetyHelper # for safe_join
    include ActionView::Helpers::RenderingHelper # for render
    include ActionView::Helpers::UrlHelper # for link_to

  private

    def append_class!(hash, new_class)
      existing_class = hash[:class]
      hash[:class] = [existing_class, new_class].compact.join ' '
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bh-0.0.7 lib/bh/helpers/base_helper.rb