Sha256: 0a57ddd2820caf031ee8df7c3a2548f9e6df0776d4133d2b0ecb8d9cb5039d90
Contents?: true
Size: 528 Bytes
Versions: 15
Compression:
Stored size: 528 Bytes
Contents
module ActionController module Assertions module ModelAssertions # Ensures that the passed record is valid by Active Record 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) # def assert_valid(record) clean_backtrace do assert record.valid?, record.errors.full_messages.join("\n") end end end end end
Version data entries
15 entries across 14 versions & 6 rubygems