diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-06 19:07:09 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-06 19:07:09 +0000 |
commit | da7752e59057fb7d72b972461fe459bdd413f910 (patch) | |
tree | 61723026bdb14fec8881ad1150c53e7752c7479f /activerecord/lib | |
parent | c8dd66fdcdc2170982fea8a1782c1728f79e3d41 (diff) | |
download | rails-da7752e59057fb7d72b972461fe459bdd413f910.tar.gz rails-da7752e59057fb7d72b972461fe459bdd413f910.tar.bz2 rails-da7752e59057fb7d72b972461fe459bdd413f910.zip |
Sharper example
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d4bc2ed9ef..45d23eac1d 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -132,8 +132,7 @@ module ActiveRecord # first_name, *last_name = name.split # last_name = last_name.join " " # - # find_by_first_name_and_last_name(first_name, last_name) || - # create({ :first_name => first_name, :last_name => last_name }) + # find_or_create_by_first_name_and_last_name(first_name, last_name) # end # end # end @@ -149,8 +148,7 @@ module ActiveRecord # first_name, *last_name = name.split # last_name = last_name.join " " # - # find_by_first_name_and_last_name(first_name, last_name) || - # create({ :first_name => first_name, :last_name => last_name }) + # find_or_create_by_first_name_and_last_name(first_name, last_name) # end # end # |