Sha256: dc8ea347073424e67ec3b80fdb32147fb6163c635d48597f6057046f370fc94c

Contents?: true

Size: 324 Bytes

Versions: 3

Compression:

Stored size: 324 Bytes

Contents

# Locate page by URL
#
get "/*" do
  path = params[:splat].first.split "/" # .join "/"
  @page = Aerogel::Pages::Traversal.find path, current_locale
  pass if @page.nil?

  current_page @page
  page_title @page.try( :title )
  view "pages/view"
end

error do
  "Internal server error: #{h env['sinatra.error'].inspect}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aerogel-pages-1.4.16 app/routes/pages.rb
aerogel-pages-1.4.14 app/routes/pages.rb
aerogel-pages-1.4.12 app/routes/pages.rb