Open
Description
example:
post = Mogli::Post.find(some_post_id)
post.comments_create({message: "hello"})
The call to client.post
will return a string, which blows up with this stack trace (line numbers may be off):
NoMethodError - undefined method `each' for
"20151777981831111_57381111":String:
(gem) mogli-0.0.42/lib/mogli/model.rb:22:in `Mogli::Comment#initialize'
(gem) mogli-0.0.42/lib/mogli/client.rb:219:in `Mogli::Client#create_instance'
(gem) mogli-0.0.42/lib/mogli/client.rb:219:in `Mogli::Client#map_to_class'
(gem) mogli-0.0.42/lib/mogli/client.rb:210:in `Mogli::Client#map_data'
(gem) mogli-0.0.42/lib/mogli/client.rb:169:in `Mogli::Client#post'
I'm hesitant to try hacking a fix, since there may be other non-hash/array values that need to be handled by other calls. This may be fixable by setting a default field as done here:
@yitaosun - can you take a look? This looks similar to the fix you put in for location.
Metadata
Assignees
Labels
No labels
Activity