From 402f08f1efe5dbfbf1cdd4db8b7c6c4bc91574a6 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 23 May 2009 23:55:04 +0200 Subject: in associations guide: exist? -> exists?, thanks to Peter Zlatnar --- railties/guides/source/association_basics.textile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'railties') 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 * collection.empty? * collection.size * collection.find(...) -* collection.exist?(...) +* collection.exists?(...) * collection.build(attributes = {}, ...) * collection.create(attributes = {}) @@ -1044,7 +1044,7 @@ orders.clear orders.empty? orders.size orders.find(...) -orders.exist?(...) +orders.exists?(...) orders.build(attributes = {}, ...) orders.create(attributes = {}) @@ -1122,9 +1122,9 @@ The collection.find method finds objects within the collection @open_orders = @customer.orders.find(:all, :conditions => "open = 1") -h6. collection.exist?(...) +h6. collection.exists?(...) -The collection.exist? 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 collection.exists? 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. collection.build(attributes = {}, ...) @@ -1395,7 +1395,7 @@ When you declare a +has_and_belongs_to_many+ association, the declaring class au * collection.empty? * collection.size * collection.find(...) -* collection.exist?(...) +* collection.exists?(...) * collection.build(attributes = {}) * collection.create(attributes = {}) @@ -1420,7 +1420,7 @@ assemblies.clear assemblies.empty? assemblies.size assemblies.find(...) -assemblies.exist?(...) +assemblies.exists?(...) assemblies.build(attributes = {}, ...) assemblies.create(attributes = {}) @@ -1505,9 +1505,9 @@ The collection.find method finds objects within the collection :conditions => ["created_at > ?", 2.days.ago]) -h6. collection.exist?(...) +h6. collection.exists?(...) -The collection.exist? 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 collection.exists? 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. collection.build(attributes = {}) -- cgit v1.2.3