This project is archived and is in readonly mode.
ActiveResource validations throws exceptions if errors missing
-
David Trasbo
I've attached a patch that makes sure
from_jsondoesn't pass anilvalue tofrom_array.Also, I don't know if a regression test is needed, but in my opinion this more of an edge case than a bug - dealing with JSON that doesn't have an
errorskey is the exception rather than the rule. -
Santiago Pastorino
Can you provide a failing test case. Christian you should follow this https://rails.lighthouseapp.com/projects/8994/sending-patches to get your patches applied ;)
-
David Trasbo
- Importance changed from to Low
Sorry for the delay. Forgot to watch this ticket. I've attached a new patch with a test that fails without the change to
Errors#from_jsonand passes with it. Also took the liberty to fix a test method name that seemed a bit illogical. -
Repository
(from [df083b482d3f22aebb5e48e608811a740037d2aa]) Make sure ActiveResource::Errors#from_json doesn't pass nil to #from_array [#3650 ActiveResource validations throws exceptions if errors missing state:commited]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/df083b482d3f22aebb5e48e608811a... -
Rohit Arondekar
- State changed from new to committed
