mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Give extracted options back to args in AMo callbacks. Fixes two failing tests in AR.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
committed by
Santiago Pastorino
parent
9269e55b1f
commit
8158afa47e
@@ -33,7 +33,7 @@ module ActiveModel
|
||||
options[:if] = Array.wrap(options[:if])
|
||||
options[:if] << "self.validation_context == :#{options[:on]}"
|
||||
end
|
||||
set_callback(:validation, :before, *args, &block)
|
||||
set_callback(:validation, :before, *(args << options), &block)
|
||||
end
|
||||
|
||||
def after_validation(*args, &block)
|
||||
|
||||
Reference in New Issue
Block a user