Ruby on Rails Discussions
Checking to see if a listing exists
rubyonrails-talk
askegg
(askegg)
February 2, 2007, 4:40am
1
find_or_create_by is your friend (Dynamic attribute-based finders at
ActiveRecord::Base
)
Related topics
Topic
Replies
Views
Activity
is there an activerecord method like "FIND EXISTING OR CREATE NEW IF NONE FOUND"?
rubyonrails-talk
2
120
December 22, 2008
automatically create an object if it doesn't exist?
rubyonrails-talk
1
127
December 3, 2006
best way to check if record exists? count with limit 1?
rubyonrails-talk
0
108
April 16, 2007
ActiveRecord find exceptions
rubyonrails-talk
0
61
January 3, 2007
AR::Base#exists?
rubyonrails-core
9
180
December 28, 2007