Skip to content

Commit

Permalink
Merge branch 'devel' into v0.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 12, 2015
2 parents ef35335 + 38b69e6 commit d081eee
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/helpers/bootstrap_switch_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
module BootstrapSwitchHelper

def bootstrapswitch_button(&block)
content_tag(:span, class: 'bootstrap-switch switch-small', data: bootstrapswitch_default_data) do
yield
def bootstrap_switch_tag(opts = {}, &block)
css_class = opts.delete(:class){ '' }
options = { data: bootstrapswitch_default_data }
options = options.deep_merge(opts)
options[:class] = ['bootstrap-switch', 'switch-small'].push(css_class)
content_tag(:span, options) do
yield if block_given?
end
end

Expand Down

0 comments on commit d081eee

Please sign in to comment.