Class: Carpentry::PrototypesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Carpentry::PrototypesController
- Defined in:
- app/controllers/carpentry/prototypes_controller.rb
Instance Method Summary collapse
Instance Method Details
#serve ⇒ Object
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 |