Open
Description
Imagine, that we have got Model with enum field :state and AssociatedModel. When we are trying to attach AssociatedModel to Model from rails_admin interface, the search query fails: it tries to match string and integer.
This bug hides in lib/rails_admin/adapters/active_record.rb
within build_statement
method:
when :enum
return if value.blank?
["(#{column} IN (?))", Array.wrap(value)]
end
This piece of code generates something like ...state IN ('Search string')
It must return from method in case if value.blank? || value.is_a?(String)
or something like that.