cheat sheets.

$ cheat assert_valid
assert_valid(record)

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)

Version 1, updated 174 days ago.
. o 0 ( | history | revert to | current | diff )
( add new | see all )