Skip to content

Commit

Permalink
Marge regular expressions into one for is_query
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostrzy committed Jul 27, 2012
1 parent 27c219a commit 1cf577e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/active_admin/mongoid/adaptor.rb
Expand Up @@ -26,9 +26,7 @@ def method_missing(method_id, *args, &block)
private

def is_query(method_id)
method_id.to_s =~ /_contains$/ ||
method_id.to_s =~ /_eq$/ ||
method_id.to_s =~ /_(gt|lt)/
method_id.to_s =~ /_(contains|eq|gt|lt)$/
end

def get_query_hash(search_params)
Expand Down

0 comments on commit 1cf577e

Please sign in to comment.