Skip to content

Instantly share code, notes, and snippets.

@roman-manchenko
Created June 25, 2015 16:39
Show Gist options
  • Save roman-manchenko/5ba373717ed269d32e39 to your computer and use it in GitHub Desktop.
Save roman-manchenko/5ba373717ed269d32e39 to your computer and use it in GitHub Desktop.
addTagsClasses: function () {
this.$el.addClass(_.map(this.model.get('public_tag'), function (tag) {
return 'tag-' + tag.replace(/[^a-zA-Z0-9_-]/g, '');
}).join(' '));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment