Class: Lookbook::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/lookbook/application_controller.rb

Direct Known Subclasses

PagesController, PreviewsController

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.controller_pathObject



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

def self.controller_path
  "lookbook"
end

Instance Method Details

#indexObject



13
14
15
16
17
18
19
20
# File 'app/controllers/lookbook/application_controller.rb', line 13

def index
  if feature_enabled? :pages
    landing = Lookbook.pages.find(&:landing) || Lookbook.pages.first
    if landing.present?
      redirect_to page_path(landing.lookup_path)
    end
  end
end