Class: RailsSimpleEventSourcing::EventsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RailsSimpleEventSourcing::EventsController
- Defined in:
- app/controllers/rails_simple_event_sourcing/events_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/rails_simple_event_sourcing/events_controller.rb', line 5 def index @event_types = event_types @aggregates = aggregates paginate(search_events) end |
#show ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/rails_simple_event_sourcing/events_controller.rb', line 11 def show @event = Event.find(params[:id]) @aggregate_state = @event.aggregate_state @payload_links = AggregateLinksBuilder.new(@event.payload).call @aggregate_state_links = AggregateLinksBuilder.new(@aggregate_state).call find_adjacent_versions end |