Sha256: 52b5ee7b247fc59b2ee33a6b16c5eeb1f1276abc4035966d536e6f5d89488364

Contents?: true

Size: 228 Bytes

Versions: 10

Compression:

Stored size: 228 Bytes

Contents

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

10 entries across 10 versions & 1 rubygems

Version Path
kadmin-0.3.1 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.3.0 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.2.8 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.2.7 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.2.6 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.2.3 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.2.2 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.1.7 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.1.6 app/helpers/kadmin/forms/inverted_check_box.rb
kadmin-0.1.4 app/helpers/kadmin/forms/inverted_check_box.rb