Module: Sipity::Queries::EventLogQueries

Defined in:
app/repositories/sipity/queries/event_log_queries.rb

Overview

Queries

Instance Method Summary collapse

Instance Method Details

#sequence_of_events_for(options = {}) ⇒ Object

Options Hash (options):

  • :user; (User)

    If given, what events were taken by the user

  • :entity; (Entity)

    If given, what events happened to the entity.


8
9
10
# File 'app/repositories/sipity/queries/event_log_queries.rb', line 8

def sequence_of_events_for(options = {})
  Models::EventLog.where(options.slice(:entity, :user)).order(created_at: :desc)
end