Use the rails 4.2 active job

This commit is contained in:
2015-03-11 08:15:16 +01:00
parent cb3d1d5f02
commit 61d1a5998d
6 changed files with 14 additions and 5 deletions
+1
View File
@@ -75,6 +75,7 @@ gem 'mini_magick'
gem 'active_attr'
gem 'naught'
gem 'cancancan'
gem 'sucker_punch'
#gem 'geokit'
gem 'iso_country_codes'
+8
View File
@@ -131,6 +131,8 @@ GEM
capybara (>= 1.0, < 3)
colored
launchy
celluloid (0.16.0)
timers (~> 4.0.0)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
climate_control (0.0.3)
@@ -242,6 +244,7 @@ GEM
handlebars-source (1.3.0)
hashie (3.4.0)
hike (1.2.3)
hitimes (1.2.2)
http_parser.rb (0.6.0)
i18n (0.7.0)
iso_country_codes (0.6.1)
@@ -427,6 +430,8 @@ GEM
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
sucker_punch (1.4.0)
celluloid (~> 0.16.0)
temple (0.7.5)
test_squad (0.0.1)
rails
@@ -437,6 +442,8 @@ GEM
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
timers (4.0.1)
hitimes
tinymce-rails (4.1.6)
railties (>= 3.1.1)
turnip (1.2.4)
@@ -526,6 +533,7 @@ DEPENDENCIES
slim-rails
spring
spring-commands-rspec
sucker_punch
test_squad
thin
turnip
@@ -25,6 +25,3 @@
can manage tables
a.form-action-new.new-table-button{action "newTable"}= t 'table.new_button'
= qr-codes-link
a.table-qr-codes{path qr_codes_suppliers_tables} target="_blank"
span.qr-icon
= t 'table.print_qr_codes'
+1 -1
View File
@@ -2,7 +2,7 @@ class ContactFormsController < ApplicationController
def create
@contact_form = Cmtool::ContactForm.new(contact_form_params)
if @contact_form.save
Notifier.contact_form(@contact_form.id).deliver
Notifier.contact_form(@contact_form.id).deliver_later
redirect_to root_path, notice: t('contact_form.submitted')
else
redirect_to go_to_path('contact', locale: I18n.locale), alert: @contact_form.errors.full_messages.join(', ')
+1 -1
View File
@@ -185,7 +185,7 @@ class Supplier
end
def send_creation_notifications
SupplierMailer.creation(self).deliver_now
SupplierMailer.creation(self).deliver_later
end
private
+3
View File
@@ -0,0 +1,3 @@
Rails.application.configure do
config.active_job.queue_adapter = :sucker_punch
end