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