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 class ApplicationController < ActionController::Base
6 after_filter :check_memory
8 init_gettext('software')
10 def rescue_action_in_public(exception)
11 @message = exception.message
13 render :template => "error", :layout => false, :status => 404
15 render :template => 'error', :layout => "application", :status => 404
23 logger.error 'Memory limit reached, ending process'
29 `ps -o rss= -p #{$$}`.to_i