Skip to content

Commit eb89729

Browse files
committed
fix merge errors
1 parent 014008d commit eb89729

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

railties/guides/source/active_record_validations_callbacks.textile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,8 @@ WARNING. Note that the regular expression above allows a trailing newline charac
336336

337337
<ruby>
338338
class Player < ActiveRecord::Base
339-
<<<<<<< HEAD
340-
validates_numericality_of :points
341-
validates_numericality_of :games_played, :only_integer => true
342-
=======
343339
validates :points, :numericality => true
344340
validates :games_played, :numericality => { :only_integer => true }
345-
>>>>>>> 7fd8f71... fix incorrect validation examples
346341
end
347342
</ruby>
348343

@@ -397,25 +392,16 @@ There is a +:scope+ option that you can use to specify other attributes that are
397392

398393
<ruby>
399394
class Holiday < ActiveRecord::Base
400-
<<<<<<< HEAD
401-
validates_uniqueness_of :name, :scope => :year,
402-
:message => "should happen once per year"
403-
=======
404395
validates :name, :uniqueness => { :scope => :year,
405396
:message => "should happen once per year" }
406-
>>>>>>> 7fd8f71... fix incorrect validation examples
407397
end
408398
</ruby>
409399

410400
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.
411401

412402
<ruby>
413403
class Person < ActiveRecord::Base
414-
<<<<<<< HEAD
415-
validates_uniqueness_of :name, :case_sensitive => false
416-
=======
417404
validates :name, :uniqueness => { :case_sensitive => false }
418-
>>>>>>> 7fd8f71... fix incorrect validation examples
419405
end
420406
</ruby>
421407

0 commit comments

Comments
 (0)