Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for checkboxes

  • Loading branch information...
commit c46d451710cab9b4a7d66b03fdb2000d9628a59d 1 parent 19ca065
@Ostrzy Ostrzy authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/active_admin/mongoid/adaptor.rb
View
4 lib/active_admin/mongoid/adaptor.rb
@@ -27,7 +27,7 @@ def method_missing(method_id, *args, &block)
private
def is_query(method_id)
- method_id.to_s =~ /_(contains|eq|gt|lt|gte|lte)$/
+ method_id.to_s =~ /_(contains|eq|in|gt|lt|gte|lte)$/
end
def get_query_hash(search_params)
@@ -43,6 +43,8 @@ def mongoidify_search(k, v)
[get_attribute(k, '_contains'), Regexp.new(Regexp.escape("#{v}"), Regexp::IGNORECASE)]
when /_eq$/
[get_attribute(k, '_eq'), v]
+ when /_in$/
+ [get_attribute(k, '_in').to_sym.in, v]
when /_gt$/
[get_attribute(k, "_gt").to_sym.gt, v]
when /_lt$/
Please sign in to comment.
Something went wrong with that request. Please try again.