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