Tramway Form. Implement callbacks #47
kalashnikovisme
started this conversation in
General
Replies: 2 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
One more idea!! Add option to make callbacks in one transaction with submit! I mean something like this class Users::RejectForm < Tramway::BaseForm
properties :reject_reason
after_submit -> { user.reject! }, single_transaction: true
endin this case, it will run like this ActiveRecord::Base.transaction do
user.update! params
user.reject!
endWDYT? @haukot @moshinaan |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, we have something like this. We want to
activateuser after submitMaybe we should implement callbacks in Tramway Form to be able do something like this?
I think it will allow to us do something this too
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions