 |
Forums |
Admin Start New Thread
| Message: 58256 |
 |
BY: Kubo Takehiro (kubo) DATE: 2008-07-07 14:15 SUBJECT: RE: OraNumber > The issue I have is that OraNumber.new(1).to_json #=> {}
> Is this a known issue?
No. ruby-oci8 doesn't define OraNumber#to_json. Probably the method is handled by Object#to_json which is added by activesupport.
http://github.com/rails/rails/tree/master/activesupport/lib/active_support/json/encoders
Adding the following code to the end of oci8.rb fixes the problem.
class OraNumber
def to_json(options=nil)
to_s
end
end
| |
Thread View
Post a followup to this message
|
 |