I have a query regarding rails render method.
If I have something like->
hashObj = {"a"=> 1, "b"=>2}
render json: hashObj
then I know that render method will internally call JSON.dump(hashObj) to get the json to render.
However I want to use my own custom library (e.g. Oj) to create json, can I do something like this:
hashObj = {"a"=> 1, "b"=>2}
render json: Oj.dump(hashObj, mode: :compat)
How will render method behave here ? Will it check that we are already passing it a json string and hence it does not need to call JSON.dump now ?