sanny Sin
sanny Sin

Reputation: 1555

Find! condition in ruby on rails

I've been following rails casts #221, i author using find_by_somefield! with "!". What does that mean in context of ActiveRecord find condition?

Upvotes: 0

Views: 67

Answers (2)

vijikumar
vijikumar

Reputation: 1815

see the below link. You will get the answer.

http://rorguide.blogspot.in/2011/06/active-record-finder-methods-dynamic.html

Upvotes: 1

emrahbasman
emrahbasman

Reputation: 2013

It raise an ActiveRecord::RecordNotFound error.

reference: rails guide

Upvotes: 2

Related Questions