Sha256: 25f5ce0b30e0cb58b8bf7f98e405de8a4627be2a36d4cd5ae58855b16e317b15

Contents?: true

Size: 231 Bytes

Versions: 3

Compression:

Stored size: 231 Bytes

Contents

module Kadmin
  module Forms
    class InvertedCheckBoxTag < 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

3 entries across 3 versions & 1 rubygems

Version Path
kadmin-0.4.2 app/components/kadmin/form_tags/inverted_check_box.rb
kadmin-0.4.1 app/components/kadmin/form_tags/inverted_check_box.rb
kadmin-0.4.0 app/components/kadmin/form_tags/inverted_check_box.rb