Skip to content

Instantly share code, notes, and snippets.

<div>
<div id="report_left">
<div class="reverse_fancy">
<h1>New <%= @category_type.capitalize %> Entry</h1>
</div>
<div class="clear"></div>
<div class="form_container">
<%= render :partial => 'form', :locals => {:mode => 'add'} %>
</div>
</div>
def get_receipt_call(start_date, end_date, options = {})
options = {
:use_sell_date => false,
:per_page => 50,
:current_page => 1,
:paginate => false
}.merge(options)
request = build_receipt_request(start_date, end_date, options)
response = post_xml(request)
# so obviously a method named current_user_session
def current_user_session
# @current_user_session is an instance-level variable
# .defined? is a standard unary ruby predicate, returns nil if there is nothing with the specified name in scope, otherwise returns a string
# not really important what it returns because any string will evaluate as true
# so if something has already defined @current_user_session, we return it, which bails out of the method
return @current_user_session if defined?(@current_user_session)
# we'll only get here if @current_user_session isn't yet defined
# in which case we call the find class method of UserSession to get one
# and store it in the instance variable
Introduction
Who is This Book For?
10
How to Use This Book
11
Contacting the Author
11
Acknowledgements
12
Book Updates and Sharing
if belong_tos.size > 0
belong_tos = belong_tos.delete_if {|x| x == "#{@polymorphic}, " }
if belong_tos.size > 0
last_in_array_fix = belong_tos.last
last_in_array_fix = last_in_array_fix.gsub(', ','')
belong_tos.pop
belong_tos << last_in_array_fix
schema << " - belongs_to: [#{belong_tos}]\n"
end
end
* DEFERRED: CalLateContribution should reimplement CalLateContributionTest.
* DEFERRED: Contribution#execute with single lineitem with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute with single lineitem with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute with two lineitems one payment with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute with two lineitems one payment with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems two payments with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems two payments with gateway error should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems (one tip) two payments with bad cc should disallow double contribution.
* DEFERRED: Contribution#execute two lineitems (one tip) two payments with partial auth failing non-tip should disallow double contri
1) Failure:
test_nil_defaults_for_not_null_columns(DefaultTest)
[./test/cases/defaults_test.rb:17:in `test_nil_defaults_for_not_null_columns'
./test/cases/defaults_test.rb:14:in `each'
./test/cases/defaults_test.rb:14:in `test_nil_defaults_for_not_null_columns'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
name column should be DEFAULT "".
<""> expected but was
<nil>.
Gabe da Silveira has won $100-off coupon code for any public Purple Workshops workshop from Jeff Cohen
Brendan Schwartz has won Developing Facebook Platform Applications with Rails from Mike Mangino
Dmitry Ratnikov has won Rails Rescue Handbook from Mike Gunderloy
Hugo Peixoto has won Rails Freelancing Handbook from Mike Gunderloy
Jatinder Singh has won Copy #1: Rails Test Prescriptions from Noel Rappin
Nikolay Petrachkov has won Copy #2: Rails Test Prescriptions from Noel Rappin
Morgan Schweers has won Signed copy of Ruby in Practice from Jeremy McAnally
Adam Keys has won $100 credit at Prgmr (VPS hosting) from Luke Crawford
Jatinder Singh has won Copy #1: 1yr Lighthouse (bronze) from ENTP
Elise Huard has won Copy #2: 1yr Lighthouse (bronze) from ENTP
Newly installed/migrated snow leopard system; coughs and dies trying to do a simple rvm 1.8.6
install. make.error.log shows that it's croaking on readline, so I tried the solution in the FAQ
and *that* isn't working. Debug output...
Excess ~ $ rvm debug
rvm 0.0.29 (2009.09.02) [http://rvm.beginrescueend.com/]
ruby:
interpreter: "ruby"
version: "1.8.7"
def self.parse(value)
date_value = nil
# java.util.GregorianCalendar[time=1251874800000,areFieldsSet=true,areAllFieldsSet=true,
lenient=true,zone=sun.util.calendar.ZoneInfo[id="US/Pacific",offset=-28800000,dstSavings=3600000,
useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=US/Pacific,offset=-28800000,
dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,
startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,
endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=8,
WEEK_OF_YEAR=36,WEEK_OF_MONTH=1,DAY_OF_MONTH=2,DAY_OF_YEAR=245,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=1,