I have set the acts-as-taggable-on
gem in my model like this :
acts_as_taggable_on :deshanatags
It use the context deshanatags
. Now I need to get a list of all the tags (not only the ones assigned for one item. I need everything) in this context in the following format :
[
{"id":"856","name":"House"},
{"id":"1035","name":"Desperate Housewives"}
]
How can I do this?
I tried to follow many tutorials but hit dead ends because most of them are written for Rails 3. Rails for have some changes to the model like removal of attr_accessor which make it difficult for me to understand those tutorials. So please help.
Simply im trying to add Jquery Token input (http://loopj.com/jquery-tokeninput/) to my app
PS : Through Tagging table, is there a way to get a list of tags like the output of Tag.all by filtering the context?
deshanatags
? – Hindemith