Sha256: 5b9a371b42aa615c6b5b115082a560f31c8be403b692851c0b79d388fb3f07b4
Contents?: true
Size: 657 Bytes
Versions: 14
Compression:
Stored size: 657 Bytes
Contents
module Headmin module Filter class SearchView < ViewModel def input_options keys = attributes - %i[params] options = to_h.slice(*keys) options = default_input_options.merge(options) options.merge(label: false) end private def default_input_options { name: name, value: params[name], wrapper: false, placeholder: placeholder } end def name @name || attribute || :search end def placeholder @placeholder || I18n.t("headmin.filters.search.placeholder", resource: label) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems