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
# Our app is a backbone.js app, so no 'normal' page loads. | |
class App.Actions | |
# Our version of identify to deal with logged in vs anonymous users. | |
identify: (options = {}) => | |
callback = options.callback | |
delete options.callback |
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
renderClassesEditor: -> | |
raw = $(".courses input:b(values)").val() | |
raw = "[]" if _.isBlank raw | |
@enrolledCourses = JSON.parse raw | |
raw = $(".courses input:b(available)").val() | |
raw = "[]" if _.isBlank raw | |
@availableCourses = JSON.parse raw |
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
[{"id":3106,"name":"Instrumentals","children":[{"id":22511,"name":"Indie - Upbeat"},{"id":22556,"name":"Pop"},{"id":22600,"name":"Electro Lounge"},{"id":22651,"name":"Hip Hop"},{"id":22689,"name":"Hard Rock"},{"id":22736,"name":"Rock - Drums"},{"id":22766,"name":"Muted Guitar"},{"id":22796,"name":"Emotional Rock"},{"id":22844,"name":"Rock - Techno"},{"id":22904,"name":"Indie Rock"},{"id":23041,"name":"Dance Club"},{"id":23323,"name":"Film/TV - World"},{"id":23661,"name":"Film/TV - Whimsical/Quirky"},{"id":23748,"name":"Film/TV - Suspense"},{"id":23968,"name":"Rock & Roll"},{"id":24571,"name":"Film/TV - Percussion"},{"id":24830,"name":"Groove"},{"id":25159,"name":"Electronica"},{"id":25240,"name":"Film/TV - Dramatic"},{"id":25392,"name":"Ambient"},{"id":25683,"name":"Film/TV - Action"}],"tracks":[]},{"id":3107,"name":"Bands","children":[{"id":22514,"name":"Pearl Django"}],"tracks":[]},{"id":3108,"name":"Risk Film","children":[{"id":22520,"name":"Tension tones/uplifting"},{"id":22536,"name":"Tension tones/Erie" |
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
Handlebars.template = function(templateString) { | |
return function () { | |
if (arguments.length < 1) { | |
// With no arguments, return the raw template -- useful for rendering | |
// partials. | |
return templateString; | |
} else { | |
Handlebars.templates = Handlebars.templates || {} | |
Handlebars.templates[templateString] = Handlebars.templates[templateString] || Handlebars.compile(templateString); | |
return Handlebars.templates[templateString](arguments[0], arguments[1]); |
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
require "test/unit" | |
class Module | |
alias_method :old_private, :private | |
def private(*args) | |
old_private(*args) | |
end | |
end | |
NewerOlder