Permalink
Browse files

fix merge errors

  • Loading branch information...
1 parent 014008d commit eb8972937005486d97789a950456f5144f89da56 @vijaydev vijaydev committed Jun 16, 2011
Showing with 0 additions and 14 deletions.
  1. +0 −14 railties/guides/source/active_record_validations_callbacks.textile
@@ -336,13 +336,8 @@ WARNING. Note that the regular expression above allows a trailing newline charac
<ruby>
class Player < ActiveRecord::Base
-<<<<<<< HEAD
- validates_numericality_of :points
- validates_numericality_of :games_played, :only_integer => true
-=======
validates :points, :numericality => true
validates :games_played, :numericality => { :only_integer => true }
->>>>>>> 7fd8f71... fix incorrect validation examples
end
</ruby>
@@ -397,25 +392,16 @@ There is a +:scope+ option that you can use to specify other attributes that are
<ruby>
class Holiday < ActiveRecord::Base
-<<<<<<< HEAD
- validates_uniqueness_of :name, :scope => :year,
- :message => "should happen once per year"
-=======
validates :name, :uniqueness => { :scope => :year,
:message => "should happen once per year" }
->>>>>>> 7fd8f71... fix incorrect validation examples
end
</ruby>
There is also a +:case_sensitive+ option that you can use to define whether the uniqueness constraint will be case sensitive or not. This option defaults to true.
<ruby>
class Person < ActiveRecord::Base
-<<<<<<< HEAD
- validates_uniqueness_of :name, :case_sensitive => false
-=======
validates :name, :uniqueness => { :case_sensitive => false }
->>>>>>> 7fd8f71... fix incorrect validation examples
end
</ruby>

0 comments on commit eb89729

Please sign in to comment.