Carto::Geocodeur → ApiAdresse::Geocodeur
This commit is contained in:
parent
d726fbf698
commit
5e9e913dce
4 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ class Ban::SearchController < ApplicationController
|
|||
end
|
||||
|
||||
def get_address_point
|
||||
point = Carto::Geocodeur.convert_adresse_to_point(params[:request])
|
||||
point = ApiAdresse::Geocodeur.convert_adresse_to_point(params[:request])
|
||||
|
||||
if point.present?
|
||||
lon = point.x.to_s
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Carto
|
||||
module ApiAdresse
|
||||
# this class take a string in input and return a point
|
||||
class Geocodeur
|
||||
def self.convert_adresse_to_point(address)
|
|
@ -243,7 +243,7 @@ class Dossier < ApplicationRecord
|
|||
|
||||
def geo_position
|
||||
if etablissement.present?
|
||||
point = Carto::Geocodeur.convert_adresse_to_point(etablissement.geo_adresse)
|
||||
point = ApiAdresse::Geocodeur.convert_adresse_to_point(etablissement.geo_adresse)
|
||||
end
|
||||
|
||||
lon = "2.428462"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Carto::Geocodeur do
|
||||
describe ApiAdresse::Geocodeur do
|
||||
let(:address) { '50 av des champs elysees' }
|
||||
describe '.convert_adresse_to_point', vcr: { cassette_name: 'api_adresse_octo' } do
|
||||
it 'return a point' do
|
Loading…
Reference in a new issue