Sha256: 0fa5140dbfe71ffc4edcf9b648d7a0ecd258025b7ebdfbf2b44cabf79af8e7f7
Contents?: true
Size: 804 Bytes
Versions: 2
Compression:
Stored size: 804 Bytes
Contents
module Frank module Rescue def render_404 template = File.expand_path(File.dirname(__FILE__)) + '/templates/404.haml' @response['Content-Type'] = 'text/html' @response.status = 404 @response.body = tilt_lang(template, 'haml', Object.new, locals = { :request => @env, :params => @request.params, :dynamic_folder => @dynamic_folder }) log_request('404') end def render_500(excp) template = File.expand_path(File.dirname(__FILE__)) + '/templates/500.haml' @response['Content-Type'] = 'text/html' @response.status = 500 @response.body = tilt_lang(template, 'haml', Object.new, locals = { :request => @env, :params => @request.params, :exception => excp }) log_request('500', excp) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
frank-0.1.3 | lib/frank/rescue.rb |
frank-0.1.2 | lib/frank/rescue.rb |