Changeset 8857
- Timestamp:
- 02/11/08 07:24:25 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/test/cases/associations/eager_test.rb
r8856 r8857 127 127 128 128 def test_eager_association_loading_with_belongs_to_and_conditions_string_with_quoted_table_name 129 quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') 129 130 assert_nothing_raised do 130 Comment.find(:all, :include => :post, :conditions => ["#{ Comment.connection.quote_table_name('posts.id')} = ?",4])131 Comment.find(:all, :include => :post, :conditions => ["#{quoted_posts_id} = ?",4]) 131 132 end 132 133 end … … 139 140 140 141 def test_eager_association_loading_with_belongs_to_and_order_string_with_quoted_table_name 142 quoted_posts_id= Comment.connection.quote_table_name('posts') + '.' + Comment.connection.quote_column_name('id') 141 143 assert_nothing_raised do 142 Comment.find(:all, :include => :post, :order => Comment.connection.quote_table_name('posts.id'))144 Comment.find(:all, :include => :post, :order => quoted_posts_id) 143 145 end 144 146 end