Skip to content

Commit 2042156

Browse files
committed
Add validation aliases
1 parent 7aa1bee commit 2042156

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/active_interaction/extras/named_callbacks.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ def around_validate(...)
2727
set_callback(:validate, :around, ...)
2828
end
2929

30+
def before_validation(...)
31+
before_validate(...)
32+
end
33+
34+
def after_validation(...)
35+
after_validate(...)
36+
end
37+
38+
def around_validation(...)
39+
around_validate(...)
40+
end
3041

3142
def before_execute(...)
3243
set_callback(:execute, :before, ...)

0 commit comments

Comments
 (0)