Class: Lookbook::InspectorController

Inherits:
ApplicationController show all
Includes:
TargetableConcern, WithPreviewControllerConcern
Defined in:
app/controllers/lookbook/inspector_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WithPreviewControllerConcern

#preview_controller

Methods included from TargetableConcern

#inspector_data, #lookup_entities, #path_segments, #set_display_options, #set_params, #set_title, #show_404

Methods inherited from ApplicationController

#index

Class Method Details

.controller_pathObject



9
10
11
# File 'app/controllers/lookbook/inspector_controller.rb', line 9

def self.controller_path
  "lookbook/inspector"
end

Instance Method Details

#showObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/lookbook/inspector_controller.rb', line 13

def show
  if @target
    begin
      @main_panels = main_panels
      @drawer_panels = drawer_panels
    rescue => exception
      render_in_layout "lookbook/error", layout: "lookbook/inspector", error: prettify_error(exception)
    end
  else
    show_404
  end
end

#show_legacyObject



26
27
28
29
# File 'app/controllers/lookbook/inspector_controller.rb', line 26

def show_legacy
  Lookbook.logger.warn("Legacy URL path detected. These paths are deprecated and will be removed in a future version")
  redirect_to lookbook_inspect_path params[:path]
end