
Model#as_json method with explicit nil argument (ActiveSupport compatibility)
Reported by mark | September 10th, 2010 @ 04:50 PM | in 1.1
http://pastie.org/1151023 -- reproducing the bug.
ActiveSupport explicitly calls Model#as_json(nil) which causes the havoc.
Obvious fix: add options ||= {} to the first line of as_json method.
Comments and changes to this ticket
-
Dan Kubb (dkubb) September 17th, 2010 @ 11:04 PM
- Milestone set to 1.1
- State changed from new to accepted
- Assigned user set to Dan Kubb (dkubb)
- Milestone order changed from 196276 to 0
-
Dan Kubb (dkubb) September 17th, 2010 @ 11:08 PM
- State changed from accepted to resolved
(from [64464a03b6d8485fbced0a5d7150be90b6dcaf2a]) Fixed problem when #as_json received nil instead of a Hash
[#1394 state:resolved] [#1406 state:resolved] http://github.com/datamapper/dm-serializer/commit/64464a03b6d8485fb...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1406 Model#as_json method with explicit nil argument (ActiveSupport compatibility) [#1394 state:resolved] [#1406 state:resolved] http://git...
-
1394 dm-serializer to_json is broken when loading has n association [#1394 state:resolved] [#1406 state:resolved] http://git...
-
1421 ActiveSupport to_json issue with STI Rails appears to have problems serializing a DataMapper S...