Created
June 13, 2017 01:10
-
-
Save diegoy/a7ebde7a2e8678c38aeaa971028ee3c0 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 create | |
conversation = Conversation.find(params[:conversation_id]) | |
if message = conversation.messages.create(params) | |
Mailer.send_message(destination, message).deliver_later | |
AndroidNotification.sent_message(destination, message) | |
AppleNotification.sent_message(destination, message) | |
#render success | |
else | |
#render error | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment