Jeremy Baker Hubert's Random Thoughts

  • Archive
  • RSS
  • Ask me anything

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. :)

Source: tumblr.com

  • 2 years ago
  • 2
  • Permalink
  • Share
    Tweet

2 Notes/ Hide

  1. jhubert posted this
← Previous • Next →

About

A collection of thoughts from Jeremy Hubert, a curious and adventurous geek living in San Francisco.

Pages

  • Supporter Wall
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr