Permalink
Browse files

Fixed that find_all would produce invalid sql when called sequentialy #…

…490 [Scott Baron]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Jan 20, 2005
1 parent 1a5bf72 commit 4ddbe0ac44efaa166dfb5cb95cf217254ca5855e
Showing with 6 additions and 1 deletion.
  1. +5 −0 activerecord/CHANGELOG
  2. +1 −1 activerecord/lib/active_record/associations/has_many_association.rb
View
@@ -1,3 +1,8 @@
+*SVN*
+
+* Fixed that find_all would produce invalid sql when called sequentialy #490 [Scott Baron]
+
+
*1.5.1* (January 18th, 2005)
* Fixed that the belongs_to and has_one proxy would fail a test like 'if project.manager' -- this unfortunately also means that you can't call methods like project.manager.build unless there already is a manager on the project #492 [Tim Bates]
@@ -20,7 +20,7 @@ def find_all(runtime_conditions = nil, orderings = nil, limit = nil, joins = nil
if @options[:finder_sql]
records = @association_class.find_by_sql(@finder_sql)
else
- sql = @finder_sql
+ sql = @finder_sql.dup
sql << " AND #{sanitize_sql(runtime_conditions)}" if runtime_conditions
orderings ||= @options[:order]
records = @association_class.find_all(sql, orderings, limit, joins)

0 comments on commit 4ddbe0a

Please sign in to comment.