From e7f06a8d50b8418c265b859c5e7809bcf0d67cf2 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 24 Oct 2008 22:19:38 +0530 Subject: Fix release notes --- railties/doc/guides/source/2_2_release_notes.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'railties/doc/guides/source') diff --git a/railties/doc/guides/source/2_2_release_notes.txt b/railties/doc/guides/source/2_2_release_notes.txt index 00243d6941..d5eeefb16f 100644 --- a/railties/doc/guides/source/2_2_release_notes.txt +++ b/railties/doc/guides/source/2_2_release_notes.txt @@ -149,16 +149,15 @@ You can now specify conditions on join tables using a hash. This is a big help i [source, ruby] ------------------------------------------------------- class Photo < ActiveRecord::Base - belongs_to :Product + belongs_to :product end class Product < ActiveRecord::Base - has_many :products + has_many :photos end # Get all products with copyright-free photos: -Product.find(:all, :joins => :photo, - :conditions => { :photos => { :copyright => false }}) +Product.all(:joins => :photos, :conditions => { :photos => { :copyright => false }}) ------------------------------------------------------- * More information: -- cgit v1.2.3