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
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
concat: { | |
options: { | |
separator: ';' | |
}, |
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
{ | |
"name": "Project-Name", | |
"version": "0.1.0", | |
"lang": "en", | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-cli": "~0.1.7", | |
"grunt-init": "~0.2.0", | |
"grunt-contrib-jshint": "~0.3.0", | |
"grunt-contrib-watch": "~0.3.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
@import "compass"; | |
@import "compass/css3"; | |
@import "compass/css3/images"; | |
$base-color-transparent: transparent; | |
$base-color-white: rgb(255,255,255); | |
$base-color-black: rgb(0,0,0); | |
$custom-color-kia-red: rgb(196,23,44); | |
$custom-color-kia-text-gray: rgb(88,88,88); | |
$custom-color-kia-light-gray: rgb(162,162,162); |
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
<?php | |
App::uses('AppModel', 'Model'); | |
App::uses('AttachmentBehavior', 'Uploader.Model/Behavior'); | |
App::uses('FileValidationBehavior', 'Uploader.Model/Behavior'); | |
/** | |
* Attachment Model | |
* | |
* @property User $User | |
* @property CheeseProducer $CheeseProducer |
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
//Returns just the referring view. This can be used in the res.redirect or res.view. | |
var referrer = req.header('Referer').replace(req.protocol + "://" + req.host + ":" + req.port + '/', ''); |
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
return res.view(referringView, {result: false, errors: error_object}); | |
//I'm trying to get the errors in the view via: | |
//<% sails.log(errors); %> |
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
//Source: https://github.com/balderdashy/sails/issues/27 | |
var UUIDGenerator = require('node-uuid'); | |
var DirectoryController = { | |
// uploads a file to a directory | |
upload: function(req, res) { | |
// Parse form data from server | |
var parsedFormData = JSON.parse(req.param('data')); |
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
/** | |
* CampaignController | |
* | |
* @description :: Server-side logic for managing campaigns | |
* @help :: See http://links.sailsjs.org/docs/controllers | |
*/ | |
module.exports = { | |
fileExtension: function(fileName) { |
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
/* | |
* Location: /test/helpers/appHelper.js | |
* | |
* @description :: Provides 'lift' and 'lower' methods to set up | |
* and tear down a Sails instance (for use in tests) | |
*/ | |
var Sails = require('sails'), | |
should = require('should'), | |
async = require('async'), | |
lifted = false, |
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
'use strict'; | |
/* | |
* Location: /test/bootstrap.test.js | |
* | |
* @description :: This file is run before all other tests. | |
*/ | |
var should = require('chai').should(), | |
appHelper = require('./helpers/appHelper'); |
OlderNewer