Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

temporarily add initialize for complex , not work for mongoid 3

  • Loading branch information...
commit c00b1eecff800616647a10b576fdd2f3b4d8a6a9 1 parent 4dbc167
niedhui authored

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 lib/mongoid_geospatial/criterion/complex.rb
7 lib/mongoid_geospatial/criterion/complex.rb
@@ -10,6 +10,13 @@ module Criterion #:nodoc:
10 10 # becomes:
11 11 # <tt> { :field.lt => "value }</tt>
12 12 class Complex
  13 +
  14 + attr_accessor :key, :operator
  15 +
  16 + def initialize(opts = {})
  17 + @key, @operator = opts[:key], opts[:operator]
  18 + end
  19 +
13 20
14 21 def to_mongo_query v
15 22 {"$#{operator}" => v}

0 comments on commit c00b1ee

Please sign in to comment.
Something went wrong with that request. Please try again.