Skip to content

Instantly share code, notes, and snippets.

@markevans
markevans / view_example.js
Created June 8, 2012 16:28 — forked from sjltaylor/view_example.js
Example use of a view, using the class stuff
define(['view'], function(View){
return View.sub('ItemView', function(){
this.domEvent('click', 'button', 'selected')
})
})
# Put this in an initializer (config/initializers/common_scopes.rb) or library file.
#
module CommonScopes
module ClassMethods
# Sort given fields ASC or DESC
#
# Example:
#
# class Post < ActiveRecord::Base