Module: Athar::ActorLookup
- Extended by:
- ActiveSupport::Concern
- Included in:
- Deletion, TableEvent
- Defined in:
- lib/athar/actor_lookup.rb
Overview
Shared actor querying behavior for audit read models. Mixed into Athar::Deletion and Athar::TableEvent.
Instance Method Summary collapse
Instance Method Details
#actor ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/athar/actor_lookup.rb', line 22 def actor return nil if actor_type.blank? || actor_id.nil? klass = actor_type.safe_constantize return nil unless klass klass.find_by(klass.primary_key => actor_id) end |