Class: Compass::MenuController

Inherits:
ApplicationController show all
Defined in:
app/controllers/compass/menu_controller.rb

Overview

Base compass controller.

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate, #context_modified_at, #current_context, #current_context_id, #set_cache_headers, #validate_context_id

Instance Method Details

#indexObject



9
10
11
12
13
14
15
# File 'app/controllers/compass/menu_controller.rb', line 9

def index
  set_cache_headers(Compass.config.menu.cache)

  return unless stale? menu_items, etag: "compass-menu"

  render json: menu_items, filter: filter
end