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
module SimpleForm | |
module DoneComponents | |
module Span | |
def span | |
if options[:span] | |
input_html_classes << 'input-block-level' | |
options[:wrapper_html] ||= {} | |
options[:wrapper_html][:class] ||= "" | |
options[:wrapper_html][:class] <<= " #{options[:span]}" | |
end |
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
/** | |
Done. Controllers manager | |
Copyright (c) 2011 Done. Corporation | |
*/ | |
var fs = require('fs'), | |
dispatch = require('dispatch'), | |
logger = require(process.cwd() + '/lib/loggers').get('controller'); | |
var Controllers = function () { | |
var self = this, |
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
/** | |
Done. Simulated control chain for testing controllers with Vows | |
Copyright (c) 2011 Done. Corporation | |
*/ | |
var http = require('http'), | |
controllers = require(process.cwd() + '/lib/controllers'); | |
var ControlChain = module.exports = function (controllerName) { | |
this.router = controllers.router; | |
this.controller = controllers[controllerName]; |
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
var util = require('util'), | |
resourceLib = require('our-new-resource-lib'); | |
var SomeResource = function (options) { | |
resourceLib.Resource.call(this, options); | |
// | |
// Setup any other application specific state. | |
// |
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
module.exports = function setup() { | |
var fns = {}, | |
methodName; | |
function makeHelperFunction(fn) { | |
return function(req, res) { | |
return fn; | |
}; | |
} | |
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 JavascriptUnquoted | |
def initialize(text) | |
@text = text | |
end | |
def to_javascript | |
@text | |
end | |
end |