3a7b39b1067be7843c092388530b0938a920f4c6
1 module ActionController
4 # Ensures that the passed record is valid by Active Record standards and
5 # returns any error messages if it is not.
9 # # assert that a newly created record is valid
13 def assert_valid(record
)
14 ::ActiveSupport::Deprecation.warn("assert_valid is deprecated. Use assert record.valid? instead", caller
)
16 assert record
.valid
?, record
.errors
.full_messages
.join("\n")