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 "rubygems" | |
require "dm-core" | |
require "dm-validations" | |
require "spec" | |
class Contact | |
include DataMapper::Resource | |
property :id, Serial | |
property :email, String, :format => :email_address, :required => true |
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
First Tribe Followup | |
Subject: {{ tribe.name }} | |
Dear {{ tribe.founder.name }}, | |
It's been two weeks since you created your Tribe Page for {{ tribe.beneficiary_name }} at {{ tribe_url }}. The power of the Human Tribe Project is the ability to organically grow your Tribe, and the emotional and financial support system for your Beneficiary. | |
Are you looking for different ways to grow your Tribe and sell more Tribe Tags? Here are a couple ideas: |
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
TribeInvitation | |
- invitor | |
- (custom) url | |
TribeMembership | |
- tribe | |
- user | |
- (custom) memberships_url | |
Order |
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
Tribe.all(:conditions => {:founder_is_beneficiary => true, :beneficiary_id => nil}).each do |tribe| | |
tribe.update_attribute :beneficiary_id, tribe.founder_id | |
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
$(function(){ | |
$('#home-promo').contentRotator({ | |
itemSelector : '.promo-content', | |
onChange : updateControls | |
}); | |
$('#promo-controls a').click(function(){ | |
var href = $(this).attr('href'); | |
if (href == '#previous') { |
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
$(function(){ | |
// Basic Example | |
$('#people').has_nested_forms('.person'); | |
// Complex Example (see the plugin for more options) | |
$('#people').has_nested_forms('.person', { | |
depth : 2, | |
cycle_classes : false, | |
after_add : function(){ this.find('input[id$=name]').autocomplete('/people') } |
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
IndividualProfile#update cannot be called on a dirty resource | |
RAILS_ROOT: /Users/bm5k/projects/devfu/pa-prevention-project | |
Application Trace | Framework Trace | Full Trace | |
/Library/Ruby/Gems/1.8/gems/dm-core-0.10.2/lib/dm-core/resource.rb:1042:in `assert_update_clean_only' | |
/Library/Ruby/Gems/1.8/gems/dm-core-0.10.2/lib/dm-core/resource.rb:323:in `update' | |
/Library/Ruby/Gems/1.8/gems/dm-validations-0.10.2/lib/dm-validations.rb:54:in `update' | |
/Library/Ruby/Gems/1.8/gems/dm-validations-0.10.2/lib/dm-validations/support/context.rb:30:in `validation_context' | |
/Library/Ruby/Gems/1.8/gems/dm-validations-0.10.2/lib/dm-validations.rb:54:in `update' | |
/Library/Ruby/Gems/1.8/gems/dm-core-0.10.2/lib/dm-core/resource.rb:281:in `__send__' |
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 'rubygems' | |
require 'active_merchant' | |
ActiveMerchant::Billing::Base.mode = :test | |
gateway = ActiveMerchant::Billing::Base.gateway('paypal').new( | |
:login => "andy_1252435382_biz_api1.monospaced.com", | |
:password => "1252435407", | |
:signature => "Aqcbmvf5TyaGsjeP9ux2GftzrsIvAg.w5ErZiXfe3j16Srg11Jf2HPNP" | |
) |
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
log/*.log | |
log/*.pid | |
db/*.db | |
db/*.sqlite3 | |
db/schema.rb | |
tmp/**/* | |
.DS_Store | |
doc/api | |
doc/app | |
config/database.yml |
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
alias fspec="spec -f specdoc -c" |