Record will absolutely not save! so weird, please help

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”,
payable_id: 608>

p.valid?
=> false

p.school_id = 1 # school_id is attr_protected
=> 1

p.valid?
=> true

p.save
=> nil

p.save!
=> nil

p.save_with_validation
=> true

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.

On May 25, 12:07 pm, jko170 [email protected] wrote:

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:

Does your model have a method or association called transaction ?

Fred

Wow Frederick I feel like an idiot! That completely skipped my mind
because I have a has_many :transactions on another model and of course
that doesn’t cause complications. Thanks for the help!

On May 25, 6:16 am, Frederick C. [email protected]