Method: Blot::Helpers::Grid#columns
- Defined in:
- lib/blot/helpers/grid.rb
#columns(width, options = {}) ⇒ Object Also known as: column
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/blot/helpers/grid.rb', line 41 def columns(width, ={}) content_tag :table, class: "#{width} columns" do content_tag :tr do content = if [:sub_columns] block_given? ? yield : nil elsif !.empty? || block_given? content_tag :td, do optional_content() { yield if block_given? } end else nil end [content, ].join('').html_safe end end end |