Sha256: 5265475eae10004efec5b7f96f863376f40bad0e37842ab86f93d3dc27e3f1b9

Contents?: true

Size: 231 Bytes

Versions: 43

Compression:

Stored size: 231 Bytes

Contents

module Kadmin
  module FormTags
    class InvertedCheckBox < ActionView::Helpers::Tags::CheckBox
      # Overload how it gets the value and return the invert
      def value(*args)
        return !super
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
kadmin-0.6.1 app/components/kadmin/form_tags/inverted_check_box.rb
kadmin-0.5.7 app/components/kadmin/form_tags/inverted_check_box.rb
kadmin-0.5.6 app/components/kadmin/form_tags/inverted_check_box.rb