Skip to content

Commit

Permalink
lil fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed Nov 6, 2013
1 parent d239333 commit 1098971
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/mongoid_geospatial/wrappers/georuby.rb
Expand Up @@ -26,19 +26,18 @@ def self.mongoize(obj)
end
end


class Line < GeometryField

def to_geo
GeoRuby::SimpleFeatures::LineString.from_coordinates([self])
GeoRuby::SimpleFeatures::LineString.from_coordinates(self)
end

end

class Polygon < GeometryField

def to_geo
GeoRuby::SimpleFeatures::Polygon.from_coordinates([self])
GeoRuby::SimpleFeatures::Polygon.from_coordinates(self)
end

end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/river.rb
Expand Up @@ -4,7 +4,7 @@ class River

field :name, type: String
field :length, type: Integer
field :average_discharge, type: Integer
field :discharge, type: Integer
field :course, type: Line, spatial: true
# set return_array to true if you do not want a hash returned all the time
field :source, type: Point, spatial: true
Expand Down

0 comments on commit 1098971

Please sign in to comment.