Module: Workarea::Admin::ButtonsHelper

Defined in:
app/helpers/workarea/admin/buttons_helper.rb

Instance Method Summary collapse

Instance Method Details

#button_tag(*args) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/helpers/workarea/admin/buttons_helper.rb', line 4

def button_tag(*args)
  options = args.reverse.detect { |a| a.is_a?(Hash) }
  options ||= args.append({}).last

  options[:data] ||= {}
  options[:data][:disable] = true unless options[:data].key?(:disable)
  super(*args)
end