Sha256: 003e05b85f25fcc003215b9d1205521c1fa8da03be67bdeccfc5432f1e0e5e6c

Contents?: true

Size: 622 Bytes

Versions: 16

Compression:

Stored size: 622 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 page_path(landing.lookup_path)
        end
      end
    end

    protected

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lookbook-0.8.3 app/controllers/lookbook/application_controller.rb
lookbook-0.8.2 app/controllers/lookbook/application_controller.rb
lookbook-0.8.1 app/controllers/lookbook/application_controller.rb
lookbook-0.8.0 app/controllers/lookbook/application_controller.rb
lookbook-0.8.0.beta.0 app/controllers/lookbook/application_controller.rb
lookbook-0.7.4 app/controllers/lookbook/application_controller.rb
lookbook-0.7.3 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.5 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.4 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.3 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.2 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.1 app/controllers/lookbook/application_controller.rb
lookbook-0.7.2.beta.0 app/controllers/lookbook/application_controller.rb
lookbook-0.7.1 app/controllers/lookbook/application_controller.rb
lookbook-0.7.0 app/controllers/lookbook/application_controller.rb