Module: Api::Aoa::V1::Concerns::GetRestaurantList

Included in:
RestaurantsController
Defined in:
app/controllers/api/aoa/v1/concerns/get_restaurant_list.rb

Overview

Authorization functionality

Instance Method Summary collapse

Instance Method Details

#aoa_restaurant_list(named_cache_key, scope = :default) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'app/controllers/api/aoa/v1/concerns/get_restaurant_list.rb', line 6

def aoa_restaurant_list(named_cache_key, scope = :default)
  is_compact_mode = params[:compact_mode].to_s == 'true'

  if is_compact_mode
    compact_restaurant_list("#{named_cache_key}:#{I18n.locale}")
  else
    normal_restaurant_list("#{named_cache_key}:#{I18n.locale}", scope)
  end
end