2009/9/14 Kendall Buchanan <[email protected]>:
>
> I have a model w/ three validations in PaymentApplication:
>
> validate :total_applications_cannot_exceed_payment_amount
> validate :cannot_exceed_activity_price
> validates_numericality_of :amount
>
> I can confirm that one of them is firing, and that
> payment_application.valid? is returning false after calling the 'save'
> method on a new payment_application. The record, however, is getting
> saved to the database. I'd like it to not save.
>
> Am I missing something simple?

Are you sure it is getting saved?  Are you checking the return from
save, it should return false if the save fails.  If you still think it
is not functioning correctly post the relevant section of controller
code here.

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to