Browse files

point = nil should work

  • Loading branch information...
1 parent ea86115 commit 7ce873f25fd698c22ab5e342f445338693ce098f @nofxx nofxx committed Sep 13, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/mongoid_geospatial/fields/point.rb
  2. +1 −1 spec/mongoid_geospatial/fields/point_spec.rb
View
2 lib/mongoid_geospatial/fields/point.rb
@@ -58,7 +58,7 @@ class << self
# Database -> Object
def demongoize(object)
- # return unless object && !object.empty?
+ return unless object
Point.new(*object)
end
View
2 spec/mongoid_geospatial/fields/point_spec.rb
@@ -9,7 +9,7 @@
it "should not fail if point is nil" do
bar = Bar.create!(name: "Moe's")
- bar.location.x.should be_nil
+ bar.location.should be_nil
end
describe "methods" do

0 comments on commit 7ce873f

Please sign in to comment.