lardawge/carrierwave_backgrounder — pull request #133 by supermaximo93 (2013-04-10 22:30:51+00:00)
Title: Check if 'queue' column is present for Delayed::Job

When the delayed_job AR backend does not have a queue, no job will be enqueued, because it breaks with a `#` error.

This affects versions of delayed_job < 3 which do not have a queue, or versions < 3.0.4 that don't actually require a 'queue' column and it has not been added (perhaps if someone upgraded from delayed_job version 2 to 3 but didn't run `rails generate delayed_job:upgrade`).

This commit fixes this by checking for the existence of a 'queue' column and calling Delayed::Job.enqueue in the appropriate manner. It will also give a warning if a queue name has been given in the configuration but there is no queue column.