Moved message delivering into background process.
This commit is contained in:
parent
af3875d46b
commit
edadb7d8d1
3 changed files with 6 additions and 19 deletions
|
|
@ -14,7 +14,7 @@ class MessagesController < ApplicationController
|
|||
def create
|
||||
@message = @current_user.send_messages.new(params[:message])
|
||||
if @message.save
|
||||
@message.deliver #TODO: Put this into a background job
|
||||
Message.delay.deliver(@message.id)
|
||||
redirect_to messages_url, :notice => "Nachricht ist gespeichert und wird versendet."
|
||||
else
|
||||
render :action => 'new'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue