aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-05-18 11:18:46 -0300
committerEmilio Tagua <miloops@gmail.com>2009-05-18 11:18:46 -0300
commita04dedd5634cbb602cf48938cee0ff11c046b4c2 (patch)
tree66c51731cc283310362db57503d4952e0a0213bb /activerecord/lib/active_record/associations.rb
parent0048897a417774f7e5a0c8c9e82fc8684f94ebc1 (diff)
parent27de7f150b57a18d4ccdd274f6f8b621b58108c6 (diff)
downloadrails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.gz
rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.bz2
rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.zip
Merge commit 'rails/master'
Conflicts: activerecord/lib/active_record/base.rb activerecord/lib/active_record/migration.rb activerecord/test/cases/helper.rb
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 2fe08b2456..2c998faf37 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/module/delegation'
+
module ActiveRecord
class InverseOfAssociationNotFoundError < ActiveRecordError #:nodoc:
def initialize(reflection)
@@ -1674,7 +1676,7 @@ module ActiveRecord
def tables_in_string(string)
return [] if string.blank?
- string.scan(/([\.a-zA-Z_]+).?\./).flatten
+ string.scan(/([a-zA-Z_][\.\w]+).?\./).flatten
end
def tables_in_hash(hash)