Sha256: 3d24436671d6ddaaff31b4cff998546fb9e73c56e1ce00c321216c29b2dd16ff

Contents?: true

Size: 352 Bytes

Versions: 2

Compression:

Stored size: 352 Bytes

Contents

module Bootstrap
  module ViewHelpers
    module AlertHelper
      def bs_alert(title_or_options = nil, options = {}, &block)
        options = block.present? ? title_or_options : options
        options[:content] = block.present? ? nil : title_or_options

        Components::Alert.new(self, options || {}, &block).to_html
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap-view_helpers-0.0.3 app/helpers/bootstrap/view_helpers/alert_helper.rb
bootstrap-view_helpers-0.0.2 app/helpers/bootstrap/view_helpers/alert_helper.rb