Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10985 (new defect)

Opened 2 years ago

Last modified 2 years ago

Invalid ActiveResource Objects still attempt to save

Reported by: trek Assigned to: core
Priority: normal Milestone: 2.0.3
Component: ActiveResource Version: edge
Severity: normal Keywords: ActiveResource save validation
Cc:

Description

The documentation on ActiveResource validations (http://api.rubyonrails.org/classes/ActiveResource/Validations.html) implies that ARes objects that are invalid based on client-side validations (i.e. validations on the ARes client, not the REST server) will not attempt to save.

This doesn't actually appear to be the case: http://pastie.caboo.se/146724

Browsing through the ARes validations code I can't even find a place where it calls .valid? before sending off data.

Change History

02/02/08 22:22:11 changed by trek

  • summary changed from Invalid ActiveResource Objects still attempt remove save to Invalid ActiveResource Objects still attempt to save.

03/01/08 14:24:03 changed by keeran

Most of the code for client side validation is there, it's just not being used. Is this due to a design discussion/decision (should we be validating twice at all?) or is this safe to prove/test/patch?

K