app/helpers/bmc/button_helper.rb in bmc-1.3.1 vs app/helpers/bmc/button_helper.rb in bmc-1.3.2

- old
+ new

@@ -20,10 +20,11 @@ action: nil, title: text, btn_size: BMC::ButtonHelper.default_size, btn_style: BMC::ButtonHelper.default_style, add_class: [], + helper: :link_to, **options ) text = ta(action) if text.nil? && action content = fa_s(icon).concat(" ").concat(tag.span(text, class: "text")) @@ -48,10 +49,14 @@ unless confirm.nil? confirm = ta(:confirm) if confirm == true options.deep_merge!(data: {confirm: confirm}) end - link_to(content, url, options.sort.to_h) + public_send(helper, content, url, options.sort.to_h) + end + + def bs_button_to(url, **options) + bs_button(url, helper: :button_to, **options) end def new_button(url = url_for(action: :new), **options) options = { :icon => :plus,