1
0
Fork 0
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:
Santiago Pastorino and José Ignacio Costa 2010-06-07 22:21:28 -03:00
parent 73d8bf245c
commit 100f8b2dfc

View file

@ -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