This file contains hidden or 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 Effect < AR::Base | |
scope :my_scope, select('project_id, taskType, user_id, SUM(hours)').joins(:project_task).where(:project_tasks => {:project_id => 2, :taskType => 'Pre-Sales'}).group('user_id') | |
end |
This file contains hidden or 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
##### USAGE ##### | |
# | |
# The StaticValue class gives you access to globally accessible constants through a human-readable and compact format. | |
# | |
# To define a new set of static values just define a class in this file such as: | |
# StaticValue.register('MyValues') | |
# | |
# Once your class is present you can add values to it via the add_item method: | |
# MyValues.add_item :Default, 0 | |
# MyValues.add_item :Custom, 1 |
This file contains hidden or 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
$(".call-to-action").live("click",function(e){ | |
register_user_modal($(this).attr("href")); | |
e.preventDefault(); | |
return false; | |
}); | |
function register_user_modal(target_link){ | |
var options = { | |
open:function(){ | |
$.get(target_link,{}, | |
function(r){ |
This file contains hidden or 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
$(".call-to-action").live("click",function(e){ | |
try{ | |
register_user_modal($(this).attr("href")); | |
} catch(err){alert(err);} | |
e.preventDefault(); | |
return false; | |
}); | |
function register_user_modal(target_link){ | |
alert("wtf1"); | |
var options = { |
This file contains hidden or 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
raw_content = JSON.parse(yield) | |
json.content raw_content | |
json.jsonp! params[:callback] if jsonp? |
This file contains hidden or 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
namespace :tddium do | |
class AssetS3 | |
BUCKET = "tddium_assets" | |
KEEP_AROUND = 7.days | |
def initialize(branch) | |
@branch = branch | |
end |
This file contains hidden or 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
# fully resizable. just make sure you have it inside a relatively position element. | |
def modal(options = {}, &block) | |
options.merge!({:class => [options[:class], "modal clearfix"].join(' ')}) | |
render :layout => '/shared/modal', :locals => {:options => options}, &block | |
end |
This file contains hidden or 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
development: &DEV | |
adapter: makara | |
sticky_slaves: true | |
sticky_master: true | |
verbose: true | |
ansi_colors: true | |
db_adapter: mysql2 | |
host: localhost | |
encoding: utf8 |
This file contains hidden or 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
/* | |
$listvar: | |
"appname1" "blue", | |
"appname2" "red" | |
; | |
.my-selector { | |
@include tenant($listvar) { | |
background-color: $var; |
This file contains hidden or 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
Show hidden characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : false, // true: Identifiers must be in camelCase | |
"curly" : false, // true: Require {} for every new block or scope |