Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (9 sloc) 326 Bytes
---
assert_valid: |-
# 'cheat assertions' for the rest
assert_valid(record) # DEPRECATED
Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not.
Examples
# assert that a newly created record is valid
model = Model.new
assert_valid(model)