mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
update docs before_validation_on_create => before_validation(:on => :create)
This commit is contained in:
parent
73d8bf245c
commit
100f8b2dfc
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ module ActiveRecord
|
|||
# class CreditCard < ActiveRecord::Base
|
||||
# # Strip everything but digits, so the user can specify "555 234 34" or
|
||||
# # "5552-3434" or both will mean "55523434"
|
||||
# def before_validation_on_create
|
||||
# before_validation(:on => :create) do
|
||||
# self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number")
|
||||
# end
|
||||
# end
|
||||
|
|
Loading…
Reference in a new issue