Skip to content

Instantly share code, notes, and snippets.

git clone https://github.com/pledgemusic/$1.git $2
cd $2
git submodule init
git submodule update
cd vendor/gems/pledge_core
git checkout master
cp .githooks/* ../../../.git/modules/vendor/gems/pledge_core/hooks/
@babelian
babelian / gist:982801
Created May 20, 2011 12:23
dynanic mass assign
class Project < ActiveRecord::Base
class << self
def always_attributes
%w{attributes anybody can edit}
end
def draft_attributes
%w{available only while project is being written}
class Date
#hard coded to GB holidays if Holidays gem is installed.
def advance_working_days(working_dates_required)
return self if working_dates_required == 0
if Gem.available?('holidays')
require 'holidays'
require 'holidays/gb'
end