Skip to content
This repository
Browse code

fix problems with requires in metal choking under development reloadi…

…ng [#2579 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
commit e3891601d137a400722cfd0f941b9195b0a8217b 1 parent b9f9dd8
Tim Connor authored May 04, 2009 josh committed May 04, 2009

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  railties/lib/rails/rack/metal.rb
3  railties/lib/rails/rack/metal.rb
... ...
@@ -1,5 +1,6 @@
1 1
 require 'active_support/ordered_hash'
2 2
 require 'active_support/core_ext/class/attribute_accessors'
  3
+require 'active_support/dependencies'
3 4
 
4 5
 module Rails
5 6
   module Rack
@@ -27,7 +28,7 @@ def self.metals
27 28
 
28 29
         load_list.map do |requested_metal|
29 30
           if metal = all_metals[requested_metal]
30  
-            require metal
  31
+            require_dependency metal
31 32
             requested_metal.constantize
32 33
           end
33 34
         end.compact

2 notes on commit e389160

Tim Connor

Sweet, thanks Josh, hopefully a bunch of people don't say the fix breaks things for them. Didn't see many tests for this functionality, though, so here's to hoping. ;)

Joshua Peek
Collaborator
josh commented on e389160 May 04, 2009

Yeah, its really hard to write useful tests for these loading issues.

Please sign in to comment.
Something went wrong with that request. Please try again.