Skip to content

Instantly share code, notes, and snippets.

# This is for the steve Irwin Day Event
# registrants residing in the US must choose the Wildlife Warriors US charity.
# This event has the Australian Charity as default if the hero is a US resident
# the US charity is made as default
def wild_life_warriors_event_register_hack(country)
charity_profile = 605
event = 623
current_charity = @charity
if (@event.id==event and country=="United States")
if params[:url]=="julie_owens"
redirect_to :controller=>"home", :action=>"index" and return
end
# TODO
# validation
# Replace this with your real tests.
def test_offensive
@donation_as_gift.recipients_name = "Mr Donor"
@donation_as_gift.custom_message = "This is fucked you fucker"
assert_false @donation_as_gift.valid?
end
ret +="<td style='padding:5px;'>#{CurrencyUtils.convert_to_currency_unless_it_is_display_currency(currency, top_ten.local_currency,(top_ten.try(:total) || top_ten.total_in_aud).to_f,(top_ten.total_in_local_currency.to_f + ((event.try(:include_pledge_total_in_hero_pages) && top_ten.pledge_total.to_f) || 0.0)), exchange_rate)}</td>" if options[:build_type]=="individual"
rescue
# fall through
end
def build_hero_page_search_result_table(hero_pages, keywords = nil)
re=""
unless hero_pages.empty?
re += "<table width='100%' style='margin-bottom:10px;'>"
re += "<td style='background-color:#eee;' colspan='5'>"
re += "<table width='100%'>"
re += "<tr>"
# re += "<td width='30px' style='background-color:#eee;'> &nbsp; </td>"
re += "<td width='300px' style='background-color:#eee;'> <b>Name</b> </td>"
re += "<td width='200px'> <b>Team</b> </td>"
@orodio
orodio / .gitconfig
Last active December 15, 2015 17:49
Git config file
[user]
name = xxxxxx
email = xxxxx
[alias]
rename = branch -m
delete = branch -D
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
s = status --short
d = diff --stat master
@orodio
orodio / todo.md
Last active December 17, 2015 13:28
TODO:

decorator:

  • Donatoin name vs anonymous logic moved to decorator

i18n:

  • line 2: app/views/pages/aside/_admin.html.erb

policies:

  • line 1: app/view/pages/aside/_pledge.html.erb
  • line 1: app/view/pages/aside/_share_via_email.html.erb
[user]
name = James Bjorkman
email = james@bjorkman.ca
[alias]
rename = branch -m
delete = branch -D
lg = log --pretty=format:'%C(bold)–%Creset %C(red bold)%h%d%Creset | %C(green)%an%Creset | %C(magenta)%cr%Creset | %C(cyan)%s%Creset'
s = status --short
d = diff --stat master