Class: LcpRuby::LandingController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lcp_ruby/landing_controller.rb

Constant Summary

Constants included from Controller::BearerAuthentication

Controller::BearerAuthentication::BASIC_PREFIX_LENGTH, Controller::BearerAuthentication::BEARER_PREFIX_LENGTH

Instance Method Summary collapse

Methods included from Controller::Authorization

#current_evaluator

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
# File 'app/controllers/lcp_ruby/landing_controller.rb', line 6

def show
  slug = resolve_landing_slug
  if slug
    redirect_to lcp_ruby.resources_path(lcp_slug: slug)
  else
    raise LcpRuby::MetadataError, "No landing page configured and no routable pages found"
  end
end