Codeminer42/cm42-central

View on GitHub
app/controllers/beta/project_boards_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Beta::ProjectBoardsController < ApplicationController
  before_action :set_fluid_layout

  def show
    result = Beta::ProjectBoardOperations::Read.call(
      project_id: params[:id],
      current_user: current_user,
      current_flow: cookies[:current_flow],
      projects_scope: policy_scope(Project)
    )

    @project = result.success.project
    authorize @project, policy_class: Beta::ProjectPolicy

    render json: result.success.as_json(root: false)
  end

  private

  def set_fluid_layout
    @layout_settings[:fluid] = true
  end
end