fix user agent check
[opensuse:software-o-o.git] / app / controllers / application_controller.rb
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.
3
4 class ApplicationController < ActionController::Base
5
6   init_gettext('software')
7
8   def rescue_action_in_public(exception)
9     @message = exception.message
10     if request.xhr?
11       render :template => "error", :layout => false, :status => 404
12     else
13       render :template => 'error', :layout => "application", :status => 404
14     end
15   end
16   
17 end