Class: Carpentry::PrototypesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/carpentry/prototypes_controller.rb

Instance Method Summary collapse

Instance Method Details

#serveObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/controllers/carpentry/prototypes_controller.rb', line 11

def serve
  request.env["carpentry.prototype"] = true
  render "carpentry/prototypes/#{params[:file_path]}"
rescue ActionView::MissingTemplate
  if Rails.application.config.consider_all_requests_local
    raise
  else
    render file: "#{Rails.root}/public/404.html",
           status: 404,
           layout: false
  end
end