Sha256: 027389f9e427485aa7c536afec578edcd63c865f613f576492b1284be63d9156

Contents?: true

Size: 447 Bytes

Versions: 13

Compression:

Stored size: 447 Bytes

Contents

module ActiveAdmin
  module Inputs
    class FilterStringInput < ::Formtastic::Inputs::StringInput
      include FilterBase

      def to_html
        input_wrapping do
          label_html <<
          builder.text_field(input_name, input_html_options)
        end
      end

      def label_text
        I18n.t('active_admin.search_field', :field => super)
      end

      def input_name
        "#{super}_contains"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
activeadmin-0.5.1 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.5.0 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.5.0.pre1 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.5.0.pre lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.4.4 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.4.3 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.4.2 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.4.1 lib/active_admin/inputs/filter_string_input.rb
activeadmin-0.4.0 lib/active_admin/inputs/filter_string_input.rb
andrewroth_activeadmin-0.3.4.4 lib/active_admin/inputs/filter_string_input.rb
andrewroth_activeadmin-0.3.4.3 lib/active_admin/inputs/filter_string_input.rb
andrewroth_activeadmin-0.3.4.2 lib/active_admin/inputs/filter_string_input.rb
andrewroth_activeadmin-0.3.4.1 lib/active_admin/inputs/filter_string_input.rb