Module: MightyGrid::MgHTML

Defined in:
lib/mighty_grid/mighty_grid_ext.rb

Class Method Summary collapse

Class Method Details

.join_html_classes(html_options, *html_classes) ⇒ Object


24
25
26
27
28
29
30
# File 'lib/mighty_grid/mighty_grid_ext.rb', line 24

def join_html_classes(html_options, *html_classes)
  html_options[:class] ||= ''
  html_options[:class] = ([html_options[:class]] + html_classes).reject(&:blank?).map do |h_classes|
    h_classes.split(' ')
  end.flatten.uniq.join(' ')
  html_options
end