From fec66616c7927ee364fb50b256c6101118aa0fd4 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 2 Jan 2013 05:13:49 +0900 Subject: find_or_initialize_by is deprecated in AR 4 --- activerecord/lib/active_record/base.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0a3fdef5a5..bf5793d454 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -179,13 +179,6 @@ module ActiveRecord #:nodoc: # # Payment.order("created_on").find_by_amount(50) # - # Use the find_or_initialize_by_ finder if you want to return a new record without - # saving it first. Protected attributes won't be set unless they are given in a block. - # - # # No 'Winter' tag exists - # winter = Tag.find_or_initialize_by_name("Winter") - # winter.persisted? # false - # # == Saving arrays, hashes, and other non-mappable objects in text columns # # Active Record can serialize any object in text columns using YAML. To do so, you must -- cgit v1.2.3