Skip to content
welldan97 edited this page Jul 29, 2012 · 5 revisions

If you want to use other default actor instead of current_user, or if you if you want to use other model instead of Activity override initialize_protocolist method in your ApplicationController:

class ApplicationController < ActionController::Base
  protect_from_forgery

  def initialize_protocolist
    Protocolist.actor = current_admin_user
    Protocolist.activity_class = Event
  end
end

You need to set both actor and activity_class in this method even if you want to change only one of them.

Clone this wiki locally