Exception Model Saving
Although there are many way’s to test whether or not your model has saved, this is a fool-proof way that I’ve come to love.
begin object.save! rescue Record Invalid => error # failed end
Straight outa the foothills of Vermont.
Although there are many way’s to test whether or not your model has saved, this is a fool-proof way that I’ve come to love.
begin object.save! rescue Record Invalid => error # failed end
No comments yet.
RSS feed for comments on this post. TrackBack URI