Sha256: e1fa4af468f8392aba39d0a29f6e9b3f22c99bcbff792b27c897d512e4635491
Contents?: true
Size: 574 Bytes
Versions: 7
Compression:
Stored size: 574 Bytes
Contents
require_relative "input_methods" module ActiveAdminAddons module FilterInputMethods include InputMethods def object_class valid_object.klass end def input_value result = valid_object.conditions.find do |condition| condition.attributes.map(&:name).include?(valid_method.to_s) end return unless result result.values.first.value end def eq_input_name "#{valid_method}_eq" end def gteq_input_name "#{method}_gteq" end def lteq_input_name "#{method}_lteq" end end end
Version data entries
7 entries across 7 versions & 2 rubygems