aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/post.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-03-16 18:54:34 +0000
committerJon Leighton <j@jonathanleighton.com>2011-03-16 18:54:34 +0000
commit9abc94c44516afdcfe4a3b202c336c9578fd6d0d (patch)
treec6af8dd568ec7bbd522c91c16b704e184e250968 /activerecord/test/models/post.rb
parent37d93ea16046add35fecd8c279e868869ee744a5 (diff)
downloadrails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.tar.gz
rails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.tar.bz2
rails-9abc94c44516afdcfe4a3b202c336c9578fd6d0d.zip
oracle, y u defy me
Diffstat (limited to 'activerecord/test/models/post.rb')
-rw-r--r--activerecord/test/models/post.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index c3843fd264..82894a3d57 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -73,16 +73,16 @@ class Post < ActiveRecord::Base
has_many :tags_with_destroy, :through => :taggings, :source => :tag, :dependent => :destroy
has_many :tags_with_nullify, :through => :taggings, :source => :tag, :dependent => :nullify
- has_many :misc_tags, :through => :taggings, :source => :tag, :conditions => "tags.name = 'Misc'"
+ has_many :misc_tags, :through => :taggings, :source => :tag, :conditions => { :tags => { :name => 'Misc' } }
has_many :funky_tags, :through => :taggings, :source => :tag
has_many :super_tags, :through => :taggings
has_many :tags_with_primary_key, :through => :taggings, :source => :tag_with_primary_key
has_one :tagging, :as => :taggable
- has_many :first_taggings, :as => :taggable, :class_name => 'Tagging', :conditions => "taggings.comment = 'first'"
- has_many :first_blue_tags, :through => :first_taggings, :source => :tag, :conditions => "tags.name = 'Blue'"
+ has_many :first_taggings, :as => :taggable, :class_name => 'Tagging', :conditions => { :taggings => { :comment => 'first' } }
+ has_many :first_blue_tags, :through => :first_taggings, :source => :tag, :conditions => { :tags => { :name => 'Blue' } }
- has_many :first_blue_tags_2, :through => :taggings, :source => :blue_tag, :conditions => "taggings.comment = 'first'"
+ has_many :first_blue_tags_2, :through => :taggings, :source => :blue_tag, :conditions => { :taggings => { :comment => 'first' } }
has_many :invalid_taggings, :as => :taggable, :class_name => "Tagging", :conditions => 'taggings.id < 0'
has_many :invalid_tags, :through => :invalid_taggings, :source => :tag