Skip to content

Commit

Permalink
point = nil should work
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Sep 13, 2012
1 parent ea86115 commit 7ce873f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mongoid_geospatial/fields/point.rb
Expand Up @@ -58,7 +58,7 @@ class << self

# Database -> Object
def demongoize(object)
# return unless object && !object.empty?
return unless object
Point.new(*object)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/mongoid_geospatial/fields/point_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 7ce873f

Please sign in to comment.