Skip to content

Commit

Permalink
Fix respond_to bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoshaiyan committed Sep 16, 2023
1 parent 257553e commit 22b1dad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mini_defender/handles_validation_errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module MiniDefender::HandlesValidationErrors

def handle_validation_error(error)
unless self.respond_to?(:respond_to)
render json: { message: error.message, errors: error.errors }, status: :unprocessable_entity
return render json: { message: error.message, errors: error.errors }, status: :unprocessable_entity
end

respond_to do |format|
Expand Down

0 comments on commit 22b1dad

Please sign in to comment.