Reputation: 2758
So I am trying to return an object which contains an array of other objects and i am getting back the objects all escaped eg(\"name\":\"My Name\"
). I'm sure the problem is i am double encoding but I'm a ruby n00b so I am not sure how to do this properly
@Results = Marker.where("ID = '#{params[:id]}' and Stop_Id IS null").all
format.all { render json: { :Results => @Results.to_json(:include => :stops) } }
Thanks in advance!
Upvotes: 0
Views: 696