Changeset 608

Show
Ignore:
Timestamp:
09/10/07 19:07:55 (1 year ago)
Author:
e.@brainspl.at
Message:

fix exceptions patch closes #173

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/exceptions.rb

    r607 r608  
    6767       
    6868      def _layout 
    69         ::Merb::Server.config[:exception_layout] || super 
     69        ::Merb::Server.config[:exception_layout] || 'application' 
    7070      end 
    7171       
     
    111111      def status;   self.class::STATUS;                  end 
    112112      def body;     @_body;                              end 
     113       
     114      # catch any method calls that the controller responds to 
     115      # and delegate them back to the controller. 
     116      def method_missing(sym, *args, &blk) 
     117        if @controller.respond_to? sym 
     118          @controller.send(sym, *args, &blk) 
     119        else 
     120          super 
     121        end     
     122      end 
     123       
     124      # pass requests onto controller 
     125      def respond_to?(sym) 
     126        super || @controller.respond_to?(sym) 
     127      end 
    113128    end 
    114129