From 2076dca63fde71693e4b8e23c4b1ace0a35b964f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 16 Nov 2005 08:16:54 +0000 Subject: r3095@asus: jeremy | 2005-11-15 22:40:51 -0800 Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/comment.rb | 2 +- activerecord/test/fixtures/company.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'activerecord/test/fixtures') diff --git a/activerecord/test/fixtures/comment.rb b/activerecord/test/fixtures/comment.rb index fd3a43ff5a..3eab263fa4 100644 --- a/activerecord/test/fixtures/comment.rb +++ b/activerecord/test/fixtures/comment.rb @@ -6,7 +6,7 @@ class Comment < ActiveRecord::Base end def self.search_by_type(q) - self.find(:all, :conditions => ['type = ?', q]) + self.find(:all, :conditions => ["#{QUOTED_TYPE} = ?", q]) end end diff --git a/activerecord/test/fixtures/company.rb b/activerecord/test/fixtures/company.rb index 4a0c96bdd3..6d33d4e1a8 100755 --- a/activerecord/test/fixtures/company.rb +++ b/activerecord/test/fixtures/company.rb @@ -7,7 +7,9 @@ end class Firm < Company - has_many :clients, :order => "id", :dependent => true, :counter_sql => "SELECT COUNT(*) FROM companies WHERE firm_id = 1 AND (type = 'Client' OR type = 'SpecialClient' OR type = 'VerySpecialClient' )" + has_many :clients, :order => "id", :dependent => true, :counter_sql => + "SELECT COUNT(*) FROM companies WHERE firm_id = 1 " + + "AND (#{QUOTED_TYPE} = 'Client' OR #{QUOTED_TYPE} = 'SpecialClient' OR #{QUOTED_TYPE} = 'VerySpecialClient' )" has_many :clients_sorted_desc, :class_name => "Client", :order => "id DESC" has_many :clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id" has_many :dependent_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => true -- cgit v1.2.3