Random Thoughts

A collection of thoughts from Jeremy Hubert, a world traveler based in San Jose, California.
Thu Mar 5

wrong argument type Hash (expected Data) - Merb json

I was having a heck of a time with .to_json in Merb. Turns out, it was because Merb’s to_json implementation doesn’t work the same as ActiveRecords.

In order to get it working, I had to disable the Merb one by placing the following code at the top of my init.rb file:

Merb.disable :json

Just thought I’d share. :)

Comments (View)
blog comments powered by Disqus