Mostly you would get the error ArgumentError (too few arguments):
on the format
when you forget to call this part of code within the block to respond_to
method call.
Your code should actually look like
def action_name
respond_to do |format| ## Add this
format.json { render json: {}, status: :ok}
format.html
## Other format
end ## Add this
end
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…