Skip to content

Commit

Permalink
Explicitly require Active Support dependencies
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
norman committed Jul 19, 2011
1 parent 73efb68 commit 9db2d10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/lib/active_record/migration.rb
Original file line number Original file line Diff line number Diff line change
@@ -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" require "active_support/core_ext/array/wrap"


module ActiveRecord module ActiveRecord
Expand Down

0 comments on commit 9db2d10

Please sign in to comment.