From 204215640a33be36433061b1ad016b155de69a7d Mon Sep 17 00:00:00 2001 From: Anton Katunin Date: Thu, 26 Sep 2024 14:12:23 +1000 Subject: [PATCH] Add validation aliases --- lib/active_interaction/extras/named_callbacks.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/active_interaction/extras/named_callbacks.rb b/lib/active_interaction/extras/named_callbacks.rb index 7ba7ecc..cb4b114 100644 --- a/lib/active_interaction/extras/named_callbacks.rb +++ b/lib/active_interaction/extras/named_callbacks.rb @@ -27,6 +27,17 @@ def around_validate(...) set_callback(:validate, :around, ...) end + def before_validation(...) + before_validate(...) + end + + def after_validation(...) + after_validate(...) + end + + def around_validation(...) + around_validate(...) + end def before_execute(...) set_callback(:execute, :before, ...)