Sha256: 049102a16f6fa93675322b3f51a0082e27fa5b385070fba18c15896649e0cde1

Contents?: true

Size: 574 Bytes

Versions: 10

Compression:

Stored size: 574 Bytes

Contents

module Journaled::Actor
  extend ActiveSupport::Concern

  included do
    class_attribute :_journaled_actor_method_name, instance_accessor: false, instance_predicate: false
    before_action do
      RequestStore.store[:journaled_actor_proc] = self.class._journaled_actor_method_name &&
        -> { send(self.class._journaled_actor_method_name) }
    end
  end

  class_methods do
    def journaled_actor=(method_name)
      raise "Must provide a symbol method name" unless method_name.is_a?(Symbol)
      self._journaled_actor_method_name = method_name
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
journaled-2.1.1 app/controllers/concerns/journaled/actor.rb
journaled-2.1.0 app/controllers/concerns/journaled/actor.rb
journaled-2.0.3 app/controllers/concerns/journaled/actor.rb
journaled-2.0.2 app/controllers/concerns/journaled/actor.rb
journaled-2.0.1 app/controllers/concerns/journaled/actor.rb
journaled-2.0.0 app/controllers/concerns/journaled/actor.rb
journaled-2.0.0.rc1 app/controllers/concerns/journaled/actor.rb
journaled-2.0.0.alpha1 app/controllers/concerns/journaled/actor.rb
journaled-1.0.1 app/controllers/concerns/journaled/actor.rb
journaled-1.0.0 app/controllers/concerns/journaled/actor.rb