Ruby on Rails Discussions
best way to check if record exists? count with limit 1?
rubyonrails-talk
Tom_Mornini1
(Tom Mornini)
April 16, 2007, 7:58am
1
Why not:
begin find rescue # doesn't exist end
Related topics
Topic
Replies
Views
Activity
best way to check if record exists? count with limit 1?
rubyonrails-talk
2
137
April 16, 2007
Can someone suggest a better way to do this?
rubyonrails-talk
0
129
October 3, 2006
huge performance issue with ActiveRecord::Base exists?
rubyonrails-talk
3
177
October 11, 2008
User specifiy number of records returned
rubyonrails-talk
0
103
March 25, 2008
is there an activerecord method like "FIND EXISTING OR CREATE NEW IF NONE FOUND"?
rubyonrails-talk
2
123
December 22, 2008