def merge_predef_class(new_class, options = {})
      existed_class = options[:class] || options[:ext_class]

      if existed_class.blank?
        options[:class] = new_class
      else
        existed_class << " #{new_class}"
      end

      options
    end
def merge_predef_class(new_class, options = {})
      existed_class = options[:class] || options[:ext_class]

      if existed_class.blank?
        options[:class] = new_class
      else
        existed_class << " #{new_class}"
      end

      options
    end
Public: Merge a new class into class option or ext_class option

 new_class - the class string which needs to be merged to the existed
             options.
 options   - the options ( default: {} )

 Examples

   merge_predef_class('nav nav-tabs', { id: 'tabs' })
   # => { id: 'tabs', class: 'nav nav-tabs' }

   merge_predef_class('nav nav-tabs', { id: 'tabs', class: 'foo' })
   # => { id: 'tabs', class: 'foo nav nav-tabs' }

 Returns the options argument itself.