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.141 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/lib/active_admin/inputs/filter_select_input.rb