Class: RailsSimpleEventSourcing::EventsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails_simple_event_sourcing/events_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
# File 'app/controllers/rails_simple_event_sourcing/events_controller.rb', line 5

def index
  load_filter_options
  scope = search_events
  paginate(scope)
end

#showObject



11
12
13
14
15
# File 'app/controllers/rails_simple_event_sourcing/events_controller.rb', line 11

def show
  @event = Event.find(params[:id])
  @aggregate_state = @event.aggregate_state
  find_adjacent_versions
end