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