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
147
December 22, 2008
Best way to do a find_by_or_create based on an attribute?
rubyonrails-talk
7
285
December 16, 2010
Rails 2.0 missing find_or_create_by_name and find_or_initialize_by_name
rubyonrails-talk
3
213
October 19, 2007
[Issue #5097] attributeless find_or_create/find_or_initialize
rubyonrails-core
patch
0
363
July 12, 2010
Find first or create
rubyonrails-talk
6
164
March 13, 2010