• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sleede / fab-manager / #106

pending completion
#106

push

coveralls-ruby

sylvainbx
Merge branch 'dev' for release 6.0.0

704 of 704 new or added lines in 168 files covered. (100.0%)

7919 of 13474 relevant lines covered (58.77%)

15.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/controllers/api/supporting_document_refusals_controller.rb
1
# frozen_string_literal: true
2

3
# API Controller for resources of type SupportingDocumentRefusal
4
# SupportingDocumentRefusal are used by admin refuse user's proof of identity file
5
class API::SupportingDocumentRefusalsController < API::APIController
×
6
  before_action :authenticate_user!
×
7

8
  def index
×
9
    authorize SupportingDocumentRefusal
×
10
    @supporting_document_refusals = SupportingDocumentRefusalService.list(params)
×
11
  end
×
12

13
  def show; end
×
14

15
  # POST /api/supporting_document_refusals/
16
  def create
×
17
    authorize SupportingDocumentRefusal
×
18
    @supporting_document_refusal = SupportingDocumentRefusal.new(supporting_document_refusal_params)
×
19
    if SupportingDocumentRefusalService.create(@supporting_document_refusal)
×
20
      render :show, status: :created, location: @supporting_document_refusal
×
21
    else
×
22
      render json: @supporting_document_refusal.errors, status: :unprocessable_entity
×
23
    end
×
24
  end
×
25

26
  private
×
27

28
  # Never trust parameters from the scary internet, only allow the white list through.
29
  def supporting_document_refusal_params
×
30
    params.required(:supporting_document_refusal).permit(:message, :operator_id, :user_id, supporting_document_type_ids: [])
×
31
  end
×
32
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc