Sha256: de8bd0084d2d037449ecf38d4ecc608e3978f0d1de77c6f65774d2deb6020689

Contents?: true

Size: 531 Bytes

Versions: 47

Compression:

Stored size: 531 Bytes

Contents

module ActiveAdmin
  module Inputs
    class FilterSelectInput < ::Formtastic::Inputs::SelectInput
      include FilterBase

      def input_name
        "#{super}_eq"
      end

      def input_options
        super.merge(:include_blank => I18n.t('active_admin.any'))
      end

      def method
        if super.to_s.scan(/_id/).count('_id') == 1
          super.to_s.sub(/_id$/, '').to_sym
        else
          super.to_s.to_sym
        end
      end

      def extra_input_html_options
        {}
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.94 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.92 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.90 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.84 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.80 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.79 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.78 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.77 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.74 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.73 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.72 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.71 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.66 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.65 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
activeadmin-0.6.0 lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.64 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.63 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.62 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.61 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.60 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb