Module: C80Push::ApplicationHelper

Defined in:
app/helpers/c80_push/application_helper.rb

Overview

Предоставляет внешний интерфейс - методы, которыми можно пользоваться в host приложении

Instance Method Summary collapse

Instance Method Details

#c80_push_render_page_dealersObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/helpers/c80_push/application_helper.rb', line 8

def c80_push_render_page_dealers

  # список регионов, включая дилеры и офисы
  region_dealer_office_list = Region.includes(dealers: :offices)

  # хэш для построения точек на Yandex карте
  ymap_hash = prepare_ymap_hash(region_dealer_office_list)

  # список регионов для select-а "Выберите регион"
  r = prepare_regions_hash(region_dealer_office_list)

  render partial: 'c80_push/shared/page_dealers',
         locals: {
             rdo_list: region_dealer_office_list,
             regions_list: r,
             ymap_hash: ymap_hash
         }
end