UPDATE
Now there is a better solution :), try this gem activejob_backport , it is easier to install, the same functions as rails 4.2.
CAUTION: OUTSIDE CONTENTS BELOW
To use ActiveJob in Rails 4.1, you need to do this first.
# in Gemfile gem 'activejob'
You should then be able to reference ActiveJob in your rails application to create and queue a job:
# app/jobs/guests_cleanup_job.rb class GuestsCleanupJob < ActiveJob::Base queue_as :default def perform(*args)
However, there are some errors: the big difference is not exactly the same ActiveJob inside Rails 4.2.beta strong>, as the flaws of the generators, callbacks and syntax are slightly different. I wrote a blog post if you want to dig more: http://kinopyo.com/blog/use-activejob-in-rails-4-1/
source share