public
Description: Trusted third party timestamping service
Homepage: http://timecert.org
Clone URL: git://github.com/pelle/TimeCert.git
pelle (author)
Tue Jun 02 16:51:31 -0700 2009
commit  81afaf087ee7ae50679c87e5f62026352540742c
tree    a356cfd513660954507f8e3f7d140348541bc80b
parent  df398493a8fe9f790e64b61997558290f9567294
100644 32 lines (24 sloc) 1.19 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if defined? ActiveSupport
  
  # Hack to force Rails version prior to 2.0 to use quoted JSON as per the JSON standard... (TODO: could be cleaner!)
  if (defined?(ActiveSupport::JSON) && ActiveSupport::JSON.respond_to?(:unquote_hash_key_identifiers))
    ActiveSupport::JSON.unquote_hash_key_identifiers = false
  end
 
end
 
if defined? ActionController
 
  module ActionController
    class Base
    
      def rescue_action_with_exceptional(exception)
        # TODO potentially hook onto rescue_without_handler if it exists? would negate need to check handler_for_rescue every time.
        # if there's handler defined with rescue_from() do not call Exceptional
        if !(respond_to?(:handler_for_rescue) && handler_for_rescue(exception))
          params_to_send = (respond_to? :filter_parameters) ? filter_parameters(params) : params
          Exceptional.handle(exception, self, request, params_to_send)
        end
            
        rescue_action_without_exceptional exception
      end
    
      alias_method :rescue_action_without_exceptional, :rescue_action
      alias_method :rescue_action, :rescue_action_with_exceptional
      protected :rescue_action
    end
  end
 
end