1 # Filters added to this controller apply to all controllers in the application.
2 # Likewise, all the methods added will be available for all controllers.
4 require 'memory_profiler'
6 class ApplicationController < ActionController::Base
12 init_gettext('software')
15 MemoryProfiler.start :string_debug => false
18 def rescue_action_in_public(exception)
19 @message = exception.message
21 render :template => "error", :layout => false, :status => 404
23 render :template => 'error', :layout => "application", :status => 404
28 @memory = `ps -o rss= -p #{$$}`.to_i
32 mu = `ps -o rss= -p #{$$}`.to_i
33 logger.debug "Request took #{mu-@memory} - now #{mu}"