Class: Api::Vendor::V1::CitiesController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- Api::Vendor::V1::CitiesController
- Defined in:
- app/controllers/api/vendor/v1/cities_controller.rb
Constant Summary collapse
- MINIMUM_RESTAURANTS_COUNT =
10
Constants inherited from BaseController
BaseController::CACHE_NAMESPACE
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
Methods included from LogrageCustomLogger
Methods included from ResponseCacheConcern
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/api/vendor/v1/cities_controller.rb', line 5 def index my_response_cache(cities_cache_key, :json, public: true) do cities = fetch_cities_with_minimum_restaurants serialized_cities = CitySerializer.new(cities) serialized_cities.as_json.merge(success: true, message: nil) end end |