diff options
author | Santiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com> | 2010-06-07 22:21:28 -0300 |
---|---|---|
committer | Santiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com> | 2010-06-07 22:21:28 -0300 |
commit | 100f8b2dfc9d547b23804b648ad0dba748faa99b (patch) | |
tree | b23ab57cd5c8962b5c60a2dff3ab1106fbca75a0 /activerecord | |
parent | 73d8bf245cac722ab82f0601c6984d63370003d3 (diff) | |
download | rails-100f8b2dfc9d547b23804b648ad0dba748faa99b.tar.gz rails-100f8b2dfc9d547b23804b648ad0dba748faa99b.tar.bz2 rails-100f8b2dfc9d547b23804b648ad0dba748faa99b.zip |
update docs before_validation_on_create => before_validation(:on => :create)
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 498836aca4..44fee12001 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -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 |