提交 638333b7 编写于 作者: P Pratik Naik

Move uniqueness and association validations to Active Record

上级 8828b2ca
......@@ -65,3 +65,8 @@ def errors
end
end
end
Dir[File.dirname(__FILE__) + "/validations/*.rb"].sort.each do |path|
filename = File.basename(path)
require "active_record/validations/#{filename}"
end
module ActiveModel
module ActiveRecord
module Validations
module ClassMethods
# Validates whether the associated object or objects are all valid themselves. Works with any kind of association.
......
module ActiveModel
module ActiveRecord
module Validations
module ClassMethods
# Validates whether the value of the specified attributes are unique across the system. Useful for making sure that only one user
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册