AddressController#get → #suggestions
This commit is contained in:
parent
6658b466cb
commit
99894961a5
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
class AddressController < ApplicationController
|
class AddressController < ApplicationController
|
||||||
def get
|
def suggestions
|
||||||
request = params[:request]
|
request = params[:request]
|
||||||
|
|
||||||
json = ApiAdresse::AddressAdapter.new(request).get_suggestions.map do |value|
|
json = ApiAdresse::AddressAdapter.new(request).get_suggestions.map do |value|
|
||||||
|
|
|
@ -250,7 +250,7 @@ Rails.application.routes.draw do
|
||||||
# Addresses
|
# Addresses
|
||||||
#
|
#
|
||||||
|
|
||||||
get 'address/suggestions' => 'address#get'
|
get 'address/suggestions' => 'address#suggestions'
|
||||||
get 'address/geocode' => 'address#geocode'
|
get 'address/geocode' => 'address#geocode'
|
||||||
|
|
||||||
namespace :invites do
|
namespace :invites do
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe AddressController, type: :controller do
|
describe AddressController, type: :controller do
|
||||||
describe '#GET get' do
|
describe '#GET suggestions' do
|
||||||
subject { get :get, params: { request: request } }
|
subject { get :suggestions, params: { request: request } }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
subject
|
subject
|
||||||
|
|
Loading…
Reference in a new issue