Module: Bootstrap::TableHelper
- Defined in:
- app/helpers/bootstrap/table_helper.rb
Overview
Rails helper for producing consistent Bootstrap styled tables.
Constant Summary collapse
- InvalidClassListsKeyError =
Class.new(StandardError)
- DEFAULT_CLASS_LIST =
%w(table table-bordered table-striped table-hover)
Instance Method Summary collapse
-
#bs_table_tag(class_list = :default, options = {}) ⇒ String
Produces a wrapper TABLE element with Bootstrap classes.
Instance Method Details
#bs_table_tag(class_list = :default, options = {}) ⇒ String
Produces a wrapper TABLE element with Bootstrap classes.
32 33 34 35 36 37 38 39 40 |
# File 'app/helpers/bootstrap/table_helper.rb', line 32 def bs_table_tag(*args, &block) = (args.) table_classes = _get_table_classes(args.shift) = ensure_class(, table_classes) content_tag(:table, ) do yield end end |