RUBYCRITIC
class Accounts::AttachmentsController < InternalController - Accounts::AttachmentsController assumes too much for instance variable '@attachment'
- 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