mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge branch 'master' of github.com:lifo/docrails
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user