Sha256: 430625c703d6cd46bc8d1d11a5e1e6334b4352f56710792855e9337e46e0c2f2

Contents?: true

Size: 724 Bytes

Versions: 167

Compression:

Stored size: 724 Bytes

Contents

require_dependency "avo/application_controller"

module Avo
  class HomeController < ApplicationController
    def index
      if Avo.configuration.home_path.present?
        # If the home_path is a block run it, if not, just use it
        computed_path = if Avo.configuration.home_path.respond_to? :call
          instance_exec(&Avo.configuration.home_path)
        else
          Avo.configuration.home_path
        end

        redirect_to computed_path
      elsif !Rails.env.development?
        @page_title = "Get started"
        resource = Avo::App.resources.min_by { |resource| resource.model_key }
        redirect_to resources_path(resource: resource)
      end
    end

    def failed_to_load
    end
  end
end

Version data entries

167 entries across 167 versions & 1 rubygems

Version Path
avo-2.18.0 app/controllers/avo/home_controller.rb
avo-2.17.1.pre.5.stackedlayout app/controllers/avo/home_controller.rb
avo-2.17.1.pre.4.issue.1342 app/controllers/avo/home_controller.rb
avo-2.17.1.pre.3 app/controllers/avo/home_controller.rb
avo-2.17.1.pre.2.customauthorizationclients app/controllers/avo/home_controller.rb
avo-2.17.1.pre.1.zeitwerk.eager.load.dir app/controllers/avo/home_controller.rb
avo-2.17.0 app/controllers/avo/home_controller.rb
avo-2.16.1.pre.1.nativefields app/controllers/avo/home_controller.rb
avo-2.16.0 app/controllers/avo/home_controller.rb
avo-2.15.3 app/controllers/avo/home_controller.rb
avo-2.15.3.pre.1.data.attrs.to.sidebar.items app/controllers/avo/home_controller.rb
avo-2.15.2 app/controllers/avo/home_controller.rb
avo-2.15.2.pre.1 app/controllers/avo/home_controller.rb
avo-2.15.1 app/controllers/avo/home_controller.rb
avo-2.15.0 app/controllers/avo/home_controller.rb
avo-2.14.3.pre.7.polytranslations1 app/controllers/avo/home_controller.rb
avo-2.14.3.pre.6.nosprockets app/controllers/avo/home_controller.rb
avo-2.14.3.pre.5.nosprockets app/controllers/avo/home_controller.rb
avo-2.14.3.pre.4.tosqlfix app/controllers/avo/home_controller.rb
avo-2.14.3.pre.3.jsbundling app/controllers/avo/home_controller.rb