Class: Carpentry::PrototypesController

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

Instance Method Summary collapse

Instance Method Details

#serveObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/carpentry/prototypes_controller.rb', line 6

def serve
  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