Fix crash when rendering modeling errors

Oh right, you can't return text from a format.json, but text can be json!
This commit is contained in:
Emi Matchu 2023-10-12 18:08:43 -07:00
parent 1e690d9f6c
commit a21ae014ef

View file

@ -86,7 +86,7 @@ class PetsController < ApplicationController
end
format.json do
render :text => options[:long_message], :status => options[:status]
render :json => options[:long_message], :status => options[:status]
end
end
end