I have a model called Todo and I render this:
format.json { render :json => @todo }
Each Todo belongs_to a List. I want to add the value
You may want to capture the value of the JSON data, and then modify it.
format.json { render :json => JSON::parse(@todo.to_json).merge("list" => { "completion_percentage" => 63 }).to_json }