lib/plezi/helpers/http_sender.rb in plezi-0.10.17 vs lib/plezi/helpers/http_sender.rb in plezi-0.11.0
- old
+ new
@@ -22,10 +22,10 @@
elsif defined?(::ERB) && Plezi.file_exists?(fn = File.join(base_code_path, "#{code}.html.erb"))
return send_raw_data request, response, ERB.new( Plezi.load_file( fn ) ).result(binding), 'text/html', code, headers
elsif Plezi.file_exists?(fn = File.join(base_code_path, "#{code}.html"))
return send_file(request, response, fn, code, headers)
end
- return true if send_raw_data(request, response, GRHttp::HTTPResponse::STATUS_CODES[code], 'text/plain', code, headers)
+ return true if send_raw_data(request, response, response.class::STATUS_CODES[code], 'text/plain', code, headers)
rescue Exception => e
Plezi.error e
end
false
end