Updated

app/controllers/accounts / attachments_controller.rb

A
16 lines of codes
2 methods
3.5 complexity/method
2 churn
6.99 complexity
0 duplications
class Accounts::AttachmentsController < InternalController
  1. Accounts::AttachmentsController assumes too much for instance variable '@attachment'
  2. Accounts::AttachmentsController has no descriptive comment
before_action :set_attachment, only: %i[destroy] def destroy @attachment.destroy respond_to do |format| format.turbo_stream end end private def set_attachment @attachment = Attachment.find(params[:id]) end end