I have a weird problem going on. All of sudden, records for a certain
model will not save with #save Please take a look at this:
p = Payment.new(:payment_reason_id => 1, :payment_method_id => 1, :date => Date.today, :amount => ‘5.00’, :payable => Student.find(608))
=> #<Payment id: nil, school_id: nil, payment_reason_id: 1,
payment_method_id: 1, date: “2008-05-25”, amount: #<BigDecimal:
46958f8,‘0.5E1’,4(8)>, created_at: nil, updated_at: nil, invoice_id:
nil, creator: nil, check_number: nil, payable_type: “Student”,
p.school_id = 1 # school_id is attr_protected
Why is save returning nil? Why is save_with_validation working?
I have a Tuition model that is very similar to the Payment model and
it does not have this problem. Please help.