This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Counter | |
include MongoMapper::Document | |
key :col, String, :unique => true | |
key :value, Integer, :default => 1 | |
def self.increment!(col) | |
col = col.name.tableize() | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App.Views.SortCaret extends Backbone.View | |
tagName: 'span' | |
className: 'sort-caret-container' | |
downCaret: 'fa-caret-down' | |
upCaret: 'fa-caret-up' | |
constructor: (options = {}) -> | |
@downCaret = options.downCaret if options.downCaret | |
@upCaret = options.upCaret if options.upCaret |