# File activerecord/lib/active_record/validations.rb, line 239 def validate(*methods, &block) methods << block if block_given? write_inheritable_set(:validate, methods) end
I think the deprecation notice is in the wrong place, it is actually the instance method ActiveRecord::Validations#validate that has been deprecated.
The same applies to ActiveRecord::Validations#validate_on_create and ActiveRecord::Validations#validate_on_update: they have both been deprecated in favour of the class methods validate_on_create and validate_on_update.
validate :must_be_friends, :on => :create