From 9db2d10b1172504e252d192b5c177cb512463875 Mon Sep 17 00:00:00 2001 From: Norman Clarke Date: Tue, 19 Jul 2011 09:47:13 -0300 Subject: Explicitly require Active Support dependencies This fixes errors when using Active Record outside of Rails. In Rails, these files are required by other classes that are always loaded, so this error does not happen. Without core_ext/module/delegation, a NoMethodError is raised because `delegate` remains undefined. Without core_ext/class/attribute_acessors, an ArgumentError is raised because `delegate` does not receive a value for its :to option. --- activerecord/lib/active_record/migration.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index c459846264..507f345ef5 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/module/delegation" +require "active_support/core_ext/class/attribute_accessors" require "active_support/core_ext/array/wrap" module ActiveRecord -- cgit v1.2.3