igor-starostenko/report_factory

View on GitHub
app/controllers/scenarios_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

# Provides logic and interface for Scenarios API
class ScenariosController < BaseProjectsController
  before_action :set_projects

  def index
    render jsonapi: @projects,
           class: { Project: SerializableScenario },
           status: :ok
  end

  private

  def set_projects
    @projects = Project.with_report_examples
  end
end