diagrams_controller.rb 305 B

123456789
  1. class DiagramsController < ApplicationController
  2. def show
  3. @agents = if params[:scenario_id].present?
  4. current_user.scenarios.find(params[:scenario_id]).agents.includes(:receivers)
  5. else
  6. current_user.agents.includes(:receivers)
  7. end
  8. end
  9. end