Permalink
Browse files

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...
knzconnor authored and josh committed May 5, 2009
1 parent b9f9dd8 commit e3891601d137a400722cfd0f941b9195b0a8217b
Showing with 2 additions and 1 deletion.
  1. +2 −1 railties/lib/rails/rack/metal.rb
@@ -1,5 +1,6 @@
require 'active_support/ordered_hash'
require 'active_support/core_ext/class/attribute_accessors'
+require 'active_support/dependencies'
module Rails
module Rack
@@ -27,7 +28,7 @@ def self.metals
load_list.map do |requested_metal|
if metal = all_metals[requested_metal]
- require metal
+ require_dependency metal
requested_metal.constantize
end
end.compact

2 comments on commit e389160

Contributor

knzconnor replied May 5, 2009

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. ;)

Member

josh replied May 5, 2009

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

Please sign in to comment.