Change @tasks.to_json to Task.all.to_json to match actual output (which I preferred over the output of @tasks.to_json)