We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
activate
For example, we have something like this. We want to activate user after submit
class UserForm < Tramway::BaseForm def submit(params) super.tap do |result| object.activate if result == true end end end
Maybe we should implement callbacks in Tramway Form to be able do something like this?
class UserForm < Tramway::BaseForm after_submit -> { object.activate } after_resist -> { object.deactivate } end
I think it will allow to us do something this too
class Users::RejectForm < Tramway::BaseForm properties :reject_reason after_submit -> { user.reject } end
What do you think?
Originally posted by @kalashnikovisme in #47
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example, we have something like this. We want to
activate
user 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?
Originally posted by @kalashnikovisme in #47
The text was updated successfully, but these errors were encountered: