提交 818b366c 编写于 作者: D David N. Welton

Merge branch 'master' of github.com:lifo/docrails

......@@ -355,7 +355,7 @@ This helper validates that the specified attributes are not empty. It uses the +
<ruby>
class Person < ActiveRecord::Base
validates :name, :presence => true, :login, :email
validates :name, :login, :email, :presence => true
end
</ruby>
......
......@@ -550,7 +550,7 @@ Ruby uses a slightly different approach than many other languages to match the e
<ruby>
class File < ActiveRecord::Base
validates :name, format => /^[\w\.\-\+]+$/
validates :name, :format => /^[\w\.\-\+]+$/
end
</ruby>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册