Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix typo on 'custom validations', at AR validation and callbacks guide

  • Loading branch information...
commit 0fbfd4fe0d79d3f9c6fb91f5458fb4f23f768dd7 1 parent fdd1ef5
Cássio Marques cassiomarques authored
2  railties/doc/guides/source/activerecord_validations_callbacks.txt
View
@@ -387,7 +387,7 @@ If your validation rules are too complicated and you want to break it in small m
[source, ruby]
------------------------------------------------------------------
class Invoice < ActiveRecord::Base
- validate :expiration_date_cannot_be_in_the_past, :discount_cannot_be_be_more_than_total_value
+ validate :expiration_date_cannot_be_in_the_past, :discount_cannot_be_more_than_total_value
def expiration_date_cannot_be_in_the_past
errors.add(:expiration_date, "can't be in the past") if !expiration_date.blank? and expiration_date < Date.today
Please sign in to comment.
Something went wrong with that request. Please try again.