Hi I'm a newbie at rails, and I'm trying to use datamapper. Json rendering is not working for me. Steps to reproduce
1) rails new dm1 2) rails g scaffold Book title:string 3) rails s WORKS: localhost:3000/books WORKS: localhost:3000/books.json (ActiveRecord) WORKS WEIRD: localhost:3000/books.xml (adding format.xml in the controller). I get this <books type="array"><book type="Book">#<Book:0x4856d60></book></books> DOES NOT WORK: localhost:3000/books/1.xml I get undefined method `bytesize' for #<Book @id=1 @title="Dune Chronicles"> INFINITE LOOP (CPU 100%, always loading, no result): localhost:3000/ books.json (works fine if its empty, when I add an entity, stops working) My environment Ruby version 1.8.7 (i386-mingw32) RubyGems version 1.8.10 Rack version 1.3 Rails version 3.1.0 All my gems http://pastie.org/2566347 My gemfile http://pastie.org/2566429 Not that critical for me, but I would like to know if anybody else can reproduce the problem and maybe add an issue to fix this if its in fact a bug Thanks -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
