Did to_json get removed or something?
views:
49answers:
2
A:
to_json
is part of ActiveRecord::Base
It looks like you might want as_json
?
macek
2010-09-17 00:36:24
+1
A:
Try adding require "active_support/core_ext"
require 'active_support'
doesn't inject behavior into the core classes by itself. That way you can pick which extensions you want. Using core_ext
dumps the extensions you are familiar with from rails into the core classes.
BaroqueBobcat
2010-09-17 00:37:13
Ahhh, shoulda known this, similar thing happened recently. This is new in 3.0 though right? This stuff used to work without doing this.
Travis R
2010-09-17 00:40:47
I think it was in one of the 2.3.x releases. I saw this behavior with 2.3.9
BaroqueBobcat
2010-09-17 01:10:33