Class: Lookbook::ApplicationController

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.controller_pathObject



24
25
26
# File 'app/controllers/lookbook/application_controller.rb', line 24

def self.controller_path
  "lookbook"
end

Instance Method Details

#indexObject



28
29
30
31
32
33
34
35
# File 'app/controllers/lookbook/application_controller.rb', line 28

def index
  landing = Engine.pages.find(&:landing?) || Engine.pages.first
  if landing.present?
    redirect_to lookbook_page_path(landing.lookup_path)
  else
    render "lookbook/index"
  end
end

#not_foundObject



37
38
39
# File 'app/controllers/lookbook/application_controller.rb', line 37

def not_found
  raise_not_found
end