Fix geo area point coordinates display
This commit is contained in:
parent
44d7750e7d
commit
61c315b276
2 changed files with 2 additions and 2 deletions
|
@ -91,7 +91,7 @@ class GeoArea < ApplicationRecord
|
||||||
|
|
||||||
def location
|
def location
|
||||||
if point?
|
if point?
|
||||||
Geo::Coord.new(*rgeo_geometry.coordinates).to_s
|
Geo::Coord.new(*rgeo_geometry.coordinates.reverse).to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe GeoArea, type: :model do
|
||||||
describe '#location' do
|
describe '#location' do
|
||||||
let(:geo_area) { build(:geo_area, :point) }
|
let(:geo_area) { build(:geo_area, :point) }
|
||||||
|
|
||||||
it { expect(geo_area.location).to eq("2°25'42\"N 46°32'19\"E") }
|
it { expect(geo_area.location).to eq("46°32'19\"N 2°25'42\"E") }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#rgeo_geometry' do
|
describe '#rgeo_geometry' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue