From 6f731dcfb5223c0d40b3ba3c613bff1e9228d64e Mon Sep 17 00:00:00 2001 From: Ryan Cook Date: Wed, 9 May 2012 09:58:11 -0600 Subject: [PATCH] Use the ActiveSupport::Dependencies functionality for determining whether files should be `load`-ed or `require`-ed -- Issue #32 --- lib/draper/system.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/draper/system.rb b/lib/draper/system.rb index af1e9f4..ad375e3 100644 --- a/lib/draper/system.rb +++ b/lib/draper/system.rb @@ -6,7 +6,7 @@ module Draper def self.load_app_local_decorators decorator_files = Dir[ "#{ Rails.root }/#{ app_local_decorator_glob }" ] - decorator_files.each { |d| load d } + decorator_files.each { |d| require_dependency d } end def self.setup(component)