diff options
author | Xavier Noria <fxn@hashref.com> | 2009-05-23 23:55:04 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-05-23 23:55:04 +0200 |
commit | 402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6 (patch) | |
tree | 5d580d56cd8cafd207135ae043e62c9223cfb790 /railties/guides/source/association_basics.textile | |
parent | 9d316bbf7c5879b0d2e245f0dbf26475765d5dd2 (diff) | |
download | rails-402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6.tar.gz rails-402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6.tar.bz2 rails-402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6.zip |
in associations guide: exist? -> exists?, thanks to Peter Zlatnar
Diffstat (limited to 'railties/guides/source/association_basics.textile')
-rw-r--r-- | railties/guides/source/association_basics.textile | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/guides/source/association_basics.textile b/railties/guides/source/association_basics.textile index aaea83fa32..06e72d33cb 100644 --- a/railties/guides/source/association_basics.textile +++ b/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> |