Skip to content

Commit

Permalink
fix problems with requires in metal choking under development reloadi…
Browse files Browse the repository at this point in the history
…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 e389160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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
Expand Down Expand Up @@ -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
Expand Down

2 comments on commit e389160

@knzconnor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@josh
Copy link
Contributor

@josh josh commented on e389160 May 5, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.