I am working with backbone.js as front end that receives a json result from controller like this
def index
myEntry = Entry.all
respond_with myEntry.to_json()
end
The resulting json arrays is collection of objects as follows
0:Object
id:1
name:matz
1:object
id:2
name: hilary
Now i have for each name an extra tag field that is stored using act-as-taggable-on gem. To access the tag of any entry i would have to use Entry.find(1).tag_list. I would like to append the result of each tag to its respective object from above, to get result something like this
0:Object
id:1
name:matz
tag:friend,rich
1:object
id:2
name: hilary
tag:intelligent