Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changes name of folder for api

  • Loading branch information...
commit 19a54e7401b870b6257455c41699f5b38c5b32e0 1 parent 7414add
@adriancuadros adriancuadros authored
View
12 lib/metropoli/rack/cities.rb
@@ -1,12 +0,0 @@
-module Metropoli
- class Cities
- extend ConfigurationHelper
-
- def self.call(env)
- @cities = eval(Metropoli.city_class).autocomplete(env["QUERY_STRING"].gsub('q=',''))
- @cities &= eval(Metropoli.city_class).limit(autocomplete_limit)
- [200, {}, ["[#{@cities.all.map(&:metropoli_json).join(',').to_s}]"]]
- end
-
- end
-end
View
12 lib/metropoli/rack/countries.rb
@@ -1,12 +0,0 @@
-module Metropoli
- class Countries
- extend ConfigurationHelper
-
- def self.call(env)
- @countries = eval(Metropoli.country_class).autocomplete(env["QUERY_STRING"].gsub('q=',''))
- @countries &= eval(Metropoli.country_class).limit(autocomplete_limit)
- [200, {}, ["[#{@countries.all.map(&:metropoli_json).join(',').to_s}]"]]
- end
-
- end
-end
View
12 lib/metropoli/rack/states.rb
@@ -1,12 +0,0 @@
-module Metropoli
- class States
- extend ConfigurationHelper
-
- def self.call(env)
- @states = eval(Metropoli.state_class).autocomplete(env["QUERY_STRING"].gsub('q=',''))
- @states &= eval(Metropoli.state_class).limit(autocomplete_limit)
- [200, {}, ["[#{@states.all.map(&:metropoli_json).join(',').to_s}]"]]
- end
-
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.