Sha256: 41b5e6846247bfadea9db99a0b5586b576e56d4825831fc769042aa1393f27cb

Contents?: true

Size: 631 Bytes

Versions: 7

Compression:

Stored size: 631 Bytes

Contents

module Lookbook
  class ApplicationController < ActionController::Base
    protect_from_forgery with: :exception

    helper Lookbook::ApplicationHelper
    helper Lookbook::OutputHelper
    helper Lookbook::ComponentHelper

    def self.controller_path
      "lookbook"
    end

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

    protected

    def feature_enabled?(feature)
      Lookbook::Features.enabled?(feature)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lookbook-0.9.6 app/controllers/lookbook/application_controller.rb
lookbook-0.9.5 app/controllers/lookbook/application_controller.rb
lookbook-0.9.4 app/controllers/lookbook/application_controller.rb
lookbook-0.9.3 app/controllers/lookbook/application_controller.rb
lookbook-0.9.2 app/controllers/lookbook/application_controller.rb
lookbook-0.9.1 app/controllers/lookbook/application_controller.rb
lookbook-0.9.0 app/controllers/lookbook/application_controller.rb