Use ActiveJob instead of Resque directly
This allows us to directly pass entities to the job.
This commit is contained in:
parent
07c8393c8c
commit
47d9c79617
16 changed files with 76 additions and 73 deletions
|
|
@ -32,7 +32,7 @@ class MessagesController < ApplicationController
|
|||
def create
|
||||
@message = @current_user.send_messages.new(params[:message])
|
||||
if @message.save
|
||||
Resque.enqueue(MessageNotifier, FoodsoftConfig.scope, 'message_deliver', @message.id)
|
||||
DeliverMessageJob.perform_later(@message)
|
||||
redirect_to messages_url, :notice => I18n.t('messages.create.notice')
|
||||
else
|
||||
render :action => 'new'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue