Last active
November 28, 2016 21:29
-
-
Save apneadiving/74d95a14a9485ee394179a69c2e6517c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def accept_invitation | |
Wf.new | |
.chain(user: :user) { AcceptInvitation.new(invitation).call } | |
.chain {|outflow| render json: { user: outflow.user } } | |
.on_dam do |error_pool| | |
render json: { errors: error_pool.full_messages }, status: 422 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment