Sha256: 7dab254b33933937ad62b0c2f79cd8683e6feae1ac3aa1c3153168adf4657a05

Contents?: true

Size: 358 Bytes

Versions: 60

Compression:

Stored size: 358 Bytes

Contents

module ActionController
  module Assertions
    module ModelAssertions
      # Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not.
      def assert_valid(record)
        clean_backtrace do
          assert record.valid?, record.errors.full_messages.join("\n")
        end
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 3 rubygems

Version Path
actionpack-1.13.4 lib/action_controller/assertions/model_assertions.rb
actionpack-1.13.5 lib/action_controller/assertions/model_assertions.rb
actionpack-1.13.6 lib/action_controller/assertions/model_assertions.rb
backlog-0.0.0 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.0.1 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.0.2 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.0.4 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.0.5 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.1.0 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.1.1 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.1.2 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.2.0 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.2.1 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.0 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.2 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.3 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.1 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.4 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.5 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
backlog-0.3.6 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb