I use paper_trail gem for versions of my models.
So far, my model depends on the info_for_paper_trail method in ApplicationController :
class ApplicationController < ActionController::Base
This works fine in the context of the controller, but is there a way so that I can replicate such things outside the context of the controller (e.g. a deferred job)?
I tried creating a virtual attribute called revision and passing proc to has_paper_trail , but it will fail with the exception of method not found :
# Attempt to solve this in the model class Resource < ActiveRecord::Base
I am assuming based on this result that meta cannot take proc , and plus I don't like how this solution smells anyway ...
source share