Sha256: ea451f37f3fe700d84b549b813b333e12bb81aa15bbac4246f964898c8259386
Contents?: true
Size: 765 Bytes
Versions: 9
Compression:
Stored size: 765 Bytes
Contents
# frozen_string_literal: true module ActiveAdmin module Inputs module Filters class StringInput < ::Formtastic::Inputs::StringInput include Base include Base::SearchMethodSelect filter :contains, :equals, :starts_with, :ends_with # If the filter method includes a search condition, build a normal string search field. # Else, build a search field with a companion dropdown to choose a search condition from. def to_html if seems_searchable? input_wrapping do label_html << builder.text_field(method, input_html_options) end else super # SearchMethodSelect#to_html end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems