public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
touch up dispatcher a bit, remove some un-needed code from the hot path
ezmobius (author)
Tue Mar 04 13:14:47 -0800 2008
commit  bf38f7948cdcb9a05a1177604d80b87558777987
tree    ef98abc73a26ebb068bbb8074e1869224cd49d5a
parent  66e0e524e72106234051371b859912befff7f670
...
39
40
41
42
 
43
44
45
46
47
48
49
50
51
52
53
 
 
54
55
56
...
39
40
41
 
42
43
44
45
46
47
 
 
 
 
 
 
48
49
50
51
52
0
@@ -39,18 +39,14 @@
0
       
0
       controller_name = (route_params[:namespace] ? route_params[:namespace] + '/' : '') + route_params[:controller]
0
       
0
- if controller_name.nil?
0
+ unless controller_name
0
         raise Merb::ControllerExceptions::NotFound, "Route matched, but route did not specify a controller"
0
       end
0
       
0
       Merb.logger.debug("Routed to: #{request.route_params.inspect}")
0
 
0
- begin
0
- cnt = controller_name.snake_case.to_const_string
0
- rescue ::String::InvalidPathConversion
0
- raise Merb::ControllerExceptions::NotFound,
0
- "Controller '#{controller_name}' could not be converted to a class"
0
- end
0
+ cnt = controller_name.snake_case.to_const_string
0
+
0
       if !Merb::Controller._subclasses.include?(cnt)
0
         raise Merb::ControllerExceptions::NotFound, "Controller '#{cnt}' not found"
0
       end

Comments

    No one has commented yet.