And plus I just love do something if something? syntax.
@baris thanks. I realised there's some issues with redactor munging the data.
When code is insered inside a <pre/> block, switching between HTML and WYSIWYG views will munge the content to HTML entitites.
You can recreate this issue on this page: http://imperavi.com/redactor/examples/typography/
Switch to code view and add some HTML inside the <pre/> block. I entered:
Switch to WYSIWYG and back to code and it has been replaced by:
This breaks the ability to parse that code later with syntax highlighters.
A main object and 3 sets as I said, nothing complex (in fact working with sets is pretty easy) but a bit confusing.
When I save or update the main object I have to also call 3 times db.setAdd() or db.setRemove() depending on vote type (upvote, downvote or undo) but thats all.