class PagesController

Thinking we have a catch-all controller that uses render inline, but could use a template handler with a comple method that queries DB? Template-finding seems to assume a file, though

Public Instance Methods

show() click to toggle source
# File app/controllers/pages_controller.rb, line 12
def show
  if params[:path]
    path = params[:path].dup
    if path
      path.gsub!(%r.html$/, "")
      path.gsub!(%r\/index$/, "")
    end
  else
    path = ""
  end
  
  @page = Page.find_by_path!(path)

  render :inline => @page.body, :layout => "application"
end
ssl_allowed?() click to toggle source
# File app/controllers/pages_controller.rb, line 8
def ssl_allowed?
  true
end