as_json was failing in one of my Rails models with:
NoMethodError: undefined method `serializable_hash' for ["id", 3]:Array
Eventually figured out that the problem was that I had specified a non-existent association to :include in as_json:
def as_json(options={})
super(:include => [:non_existent_association])
end
No comments:
Post a Comment