Permalink
Browse files

in associations guide: exist? -> exists?, thanks to Peter Zlatnar

  • Loading branch information...
1 parent 9d316bb commit 402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6 @fxn fxn committed May 23, 2009
Showing with 8 additions and 8 deletions.
  1. +8 −8 railties/guides/source/association_basics.textile
@@ -1019,7 +1019,7 @@ When you declare a +has_many+ association, the declaring class automatically gai
* <tt><em>collection</em>.empty?</tt>
* <tt><em>collection</em>.size</tt>
* <tt><em>collection</em>.find(...)</tt>
-* <tt><em>collection</em>.exist?(...)</tt>
+* <tt><em>collection</em>.exists?(...)</tt>
* <tt><em>collection</em>.build(attributes = {}, ...)</tt>
* <tt><em>collection</em>.create(attributes = {})</tt>
@@ -1044,7 +1044,7 @@ orders.clear
orders.empty?
orders.size
orders.find(...)
-orders.exist?(...)
+orders.exists?(...)
orders.build(attributes = {}, ...)
orders.create(attributes = {})
</ruby>
@@ -1122,9 +1122,9 @@ The <tt><em>collection</em>.find</tt> method finds objects within the collection
@open_orders = @customer.orders.find(:all, :conditions => "open = 1")
</ruby>
-h6. <tt><em>collection</em>.exist?(...)</tt>
+h6. <tt><em>collection</em>.exists?(...)</tt>
-The <tt><em>collection</em>.exist?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
+The <tt><em>collection</em>.exists?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
h6. <tt><em>collection</em>.build(attributes = {}, ...)</tt>
@@ -1395,7 +1395,7 @@ When you declare a +has_and_belongs_to_many+ association, the declaring class au
* <tt><em>collection</em>.empty?</tt>
* <tt><em>collection</em>.size</tt>
* <tt><em>collection</em>.find(...)</tt>
-* <tt><em>collection</em>.exist?(...)</tt>
+* <tt><em>collection</em>.exists?(...)</tt>
* <tt><em>collection</em>.build(attributes = {})</tt>
* <tt><em>collection</em>.create(attributes = {})</tt>
@@ -1420,7 +1420,7 @@ assemblies.clear
assemblies.empty?
assemblies.size
assemblies.find(...)
-assemblies.exist?(...)
+assemblies.exists?(...)
assemblies.build(attributes = {}, ...)
assemblies.create(attributes = {})
</ruby>
@@ -1505,9 +1505,9 @@ The <tt><em>collection</em>.find</tt> method finds objects within the collection
:conditions => ["created_at > ?", 2.days.ago])
</ruby>
-h6. <tt><em>collection</em>.exist?(...)</tt>
+h6. <tt><em>collection</em>.exists?(...)</tt>
-The <tt><em>collection</em>.exist?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
+The <tt><em>collection</em>.exists?</tt> method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as +ActiveRecord::Base.exists?+.
h6. <tt><em>collection</em>.build(attributes = {})</tt>

0 comments on commit 402f08f

Please sign in to comment.