-
In my after_create_account do
merge_account
end
after_login do
merge_account
end Is there a way to chain multiple of those together, so I don't have to keep redefining the same callback logic? |
Beta Was this translation helpful? Give feedback.
Answered by
janko
Jun 16, 2023
Replies: 1 comment 2 replies
-
Not sure what you mean by chaining, but you can define custom methods on your Rodauth object that you can call from hooks to keep things DRY: class RodauthMain < Rodauth::Rails::Auth
configure do
# ...
end
def merge_account
# ...
end
end |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see what you mean now. No, there isn't any built-in way to chain multiple callbacks, the only option is using a loop: