This project is archived and is in readonly mode.
ActiveResource instance.valid? has no validate callbacks
-
Smilinguy
I'm also having the same issue where my validate method is not called on valid?.
In fact, my validate isn't even called on save! unless there have been attributes modified.
In my case, these objects were created before I added new validation rules. If I try and save! them now, I would expect them to fail validation but they don't.
-
Paul Horsfall
I think that all validation in Active Resource is done by the remote service. There's "an old patch on Trac":
http://dev.rubyonrails.org/ticke... to fix the documentation which I was thinking about reviving to clear things up. Should I?
-
Tim Morton
I would vote in favor of fixing the code to match the docs, not vice versa. Local validations are useful.
See http://www.akitaonrails.com/2008... for a start.
-
josh
- State changed from new to wontfix
ARes doesn't have validations or callbacks yet. I'm assuming this is coming when we switch it over to ActiveModel.
-
Thijs
The documentation still says you can add a def validate to validate locally. Shouldn't this be removed untill it's actually working?