this is a silly bug that breaks any code where the column name of a scope is a reserved word (like group):
cfp:/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.8 > diff -buB lib/active_record/validations.rb.org lib/active_record/validations.rb
--- lib/active_record/validations.rb.org 2010-06-19 09:38:42.000000000 -0600 +++ lib/active_record/validations.rb 2010-06-19 09:39:01.000000000 -0600 @@ -825,7 +825,7 @@ if scope = configuration[:scope] Array(scope).map do |scope_item| scope_value = record.send(scope_item) - condition_sql << " AND " << attribute_condition("#{record.class.quoted_table_name}.#{scope_item}", scope_value) + condition_sql << " AND " << attribute_condition("#{record.class.quoted_table_name}.#{connection.quote_column_name(scope_item)}", scope_value) condition_params << scope_value end end