Displaying 1 result from an estimated 1 matches for "activercord".
Did you mean:
activerecord
2008 Dec 22
2
is there an activerecord method like "FIND EXISTING OR CREATE NEW IF NONE FOUND"?
Just wondering if rails has a method to look for an existing record and
return it, but if it''s not existing then create a new record. (i.e. "FIND
EXISTING OR CREATE NEW IF NONE FOUND"?)
Then when finished updating one could use the existing "save" method which
caters for either a new or updated record already
Thanks