This is the start of bunch of (hopefully) regular small posts with snippets for ruby and
rails. It’s supposed to be about those little things I keep looking up again and
so back to topic: Making a rails model save fail!
- Add something to the errors in the validation
- Make a before_filter fail (eg. before_create, …)
Return false in a before_filter, will cause the model save to fail