How to maintain topic tag order which is displayed in each tag?

i am writing one plugin which shows the topics tags into specific order. so i have written ruby code for that but now i stuck in one point. i am not getting how to render that tags in each topic page. i used api.decorateWidget(‘discourse-tags’) but not worked.