NOTE: I understand that this is not suitable for most cases, like for a public API, given that the output is not valid JSON. Also it has a lot of limitations, like it wont deserialize your serialized_attributes, you cannot use the to_json options like, :methods, :include, etc.