aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorPeter Wagenet <peter.wagenet@gmail.com>2008-07-02 21:27:42 -0400
committerPratik Naik <pratiknaik@gmail.com>2008-08-21 17:21:17 +0100
commit8622787f8748434b4ceb2b925a35b17a38e1f2d6 (patch)
tree421b5424d77319f99a015b9658f447196d73a8c2 /activerecord/lib/active_record
parent3724dafe71f4afb2ca9f4d7d2526b228aa6c05a3 (diff)
downloadrails-8622787f8748434b4ceb2b925a35b17a38e1f2d6.tar.gz
rails-8622787f8748434b4ceb2b925a35b17a38e1f2d6.tar.bz2
rails-8622787f8748434b4ceb2b925a35b17a38e1f2d6.zip
Don't interpret decimals as table names in ActiveRecord::Associations::ClassMethods#references_eager_loaded_tables? [#532 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x[-rw-r--r--]activerecord/lib/active_record/associations.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index b72fdb305f..b9039ce996 100644..100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1679,19 +1679,19 @@ module ActiveRecord
else all << cond
end
end
- conditions.join(' ').scan(/([\.\w]+).?\./).flatten
+ conditions.join(' ').scan(/([\.a-zA-Z_]+).?\./).flatten
end
def order_tables(options)
order = [options[:order], scope(:find, :order) ].join(", ")
return [] unless order && order.is_a?(String)
- order.scan(/([\.\w]+).?\./).flatten
+ order.scan(/([\.a-zA-Z_]+).?\./).flatten
end
def selects_tables(options)
select = options[:select]
return [] unless select && select.is_a?(String)
- select.scan(/"?([\.\w]+)"?.?\./).flatten
+ select.scan(/"?([\.a-zA-Z_]+)"?.?\./).flatten
end
# Checks if the conditions reference a table other than the current model table