I have a controller action that I would like to be handled asynchronously.
class CollectionsController < ApplicationController
def add
#code
end
handle_asynchronously :add
When this is called I get a: TypeError: can't dump anonymous module
The delayed_job documentation isn't clear whether the method has to be an ActiveRecord model method. I have seen examples where people use other classes to handle this, however my method uses session information. It's unclear to me whether that information would be available to another class.
Any ideas?
Thanks.