Sha256: 68050d12a9cc0d45eb3117cac8089f9ee4b4af149efe1aabb32a1e8a21bafdd2
Contents?: true
Size: 654 Bytes
Versions: 5
Compression:
Stored size: 654 Bytes
Contents
#coding: utf-8 module BootstrapHelper extend ActiveSupport::Concern #可以传参数的javascript_include_tag def javascript_include_tag_with_p(path) javascript_tag nil, :src => path end def div(opts={}, &block) content_tag('div', nil, opts) do capture(&block) if block_given? end end ############################################################################## # 合并预定义class def merge_predef_class(class_str, options={}) predef_class = [class_str] predef_class << (options.delete(:class) || options.delete(:ext_class) || '') options.merge!({class: predef_class.compact.join(' ')}) end end
Version data entries
5 entries across 5 versions & 1 rubygems