Sha256: 405bbdaa4c0c5b60a2e2a75a20926df75b7f1f21d9453e8552a5da7d0702f0a5
Contents?: true
Size: 996 Bytes
Versions: 22
Compression:
Stored size: 996 Bytes
Contents
module Binco module ButtonHelper def button(title, options = {}) options[:type] ||= :default options[:class] ||= '' options[:class] << ' ' if options[:class].length > 1 options[:class] << "btn btn-#{options[:type]}" content_tag :button, title, options.except(:type) end def button_primary(title, options = {}) options[:type] = :primary button(title, options) end def button_default(title, options = {}) options[:type] = :default button(title, options) end def button_success(title, options = {}) options[:type] = :default button(title, options) end def button_info(title, options = {}) options[:type] = :info button(title, options) end def button_warning(title, options = {}) options[:type] = :warning button(title, options) end def button_danger(title, options = {}) options[:type] = :warning button(title, options) end end end
Version data entries
22 entries across 22 versions & 1 rubygems