tabletop-companion/app/controllers/events_controller.rb

19 lines
357 B
Ruby

# frozen_string_literal: true
class EventsController < ApplicationController
layout "table"
before_action :set_table
def index
@characters = Current.user.characters.where(table: @table)
@events = @table.dice_rolls.order(:created_at)
end
private
def set_table
@table = Current.user.tables.find(params[:table_id])
end
end