Class: AhoyCaptain::Locations::MapsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- AhoyCaptain::Locations::MapsController
- Includes:
- AhoyCaptain::Limitable
- Defined in:
- app/controllers/ahoy_captain/locations/maps_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Methods included from Rangeable
Methods included from CompareMode
#compare_mode?, #comparison_mode, included
Instance Method Details
#show ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/ahoy_captain/locations/maps_controller.rb', line 12 def show if request.variant.include?(:details) results = CountryQuery.call(params) results = results.limit(limit) @countries = paginate(results).map { |country| CountryDecorator.new(country, self) } render template: 'ahoy_captain/locations/countries/index' else @countries = visit_query.group("country").count end end |