#26 ✓resolved
Stephen Bannasch

model instance conversion to_yaml broken

Reported by Stephen Bannasch | October 12th, 2007 @ 05:49 PM

model_instance.to_yaml doesn't work.

PATCH with test attached -- sorry no fix.

Testing the example models and fixture from in a svn co r312

irb(main):005:0> Zoo.find(1).to_yaml
TypeError: can't dump anonymous class Class
from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:6:in to_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:41:innode_export' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:41:in add' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:41:into_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:40:in each' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:40:into_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:39:in map' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:39:into_yaml' from /usr/local/lib/ruby/1.8/yaml.rb:387:in call' from /usr/local/lib/ruby/1.8/yaml.rb:387:inemit' from /usr/local/lib/ruby/1.8/yaml.rb:387:in quick_emit' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:38:into_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:in node_export' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:inadd' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:in to_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:17:ineach' ... 25 levels... from /usr/local/lib/ruby/1.8/yaml.rb:387:in call' from /usr/local/lib/ruby/1.8/yaml.rb:387:inemit' from /usr/local/lib/ruby/1.8/yaml.rb:387:in quick_emit' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:15:into_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:in node_export' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:inadd' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:18:in to_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:17:ineach' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:17:in to_yaml' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:16:inmap' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:16:in to_yaml' from /usr/local/lib/ruby/1.8/yaml.rb:387:incall' from /usr/local/lib/ruby/1.8/yaml.rb:387:in emit' from /usr/local/lib/ruby/1.8/yaml.rb:387:inquick_emit' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:15:in `to_yaml' from (irb):5irb(main):006:0> Zoo.find(1).to_s

Comments and changes to this ticket

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.

New-ticket Create new ticket

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

Attachments

Tags

Pages