Sha256: 9fd20a4c0605d1238d4b6917d380db1c180c3a55e817548a513e79a0f6b3dee5

Contents?: true

Size: 590 Bytes

Versions: 31

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true
module ActiveAdmin
  module Inputs
    module Filters
      class BooleanInput < ::Formtastic::Inputs::SelectInput
        include Base

        def input_name
          return method if seems_searchable?

          "#{method}_eq"
        end

        def input_html_options_name
          "#{object_name}[#{input_name}]" # was "#{object_name}[#{association_primary_key}]"
        end

        # Provide the AA translation to the blank input field.
        def include_blank
          I18n.t "active_admin.any" if super
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
activeadmin-4.0.0.beta14 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta13 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta12 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.5 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta11 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.4 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta10 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta9 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.3 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta8 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta7 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.2 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta6 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.1 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta5 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta4 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta3 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta2 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-4.0.0.beta1 lib/active_admin/inputs/filters/boolean_input.rb
activeadmin-3.2.0 lib/active_admin/inputs/filters/boolean_input.rb