Class: BigDecimal
- Inherits:
-
Object
- Object
- BigDecimal
- Defined in:
- lib/active_support/json/encoding/active_support_encoder.rb
Instance Method Summary collapse
-
#as_json(options = nil) ⇒ Object
:nodoc:.
-
#encode_json(encoder) ⇒ Object
:nodoc:.
Instance Method Details
#as_json(options = nil) ⇒ Object
:nodoc:
153 154 155 156 157 158 159 |
# File 'lib/active_support/json/encoding/active_support_encoder.rb', line 153 def as_json( = nil) #:nodoc: if finite? ActiveSupport.encode_big_decimal_as_string ? to_s : self else nil end end |
#encode_json(encoder) ⇒ Object
:nodoc:
161 162 163 |
# File 'lib/active_support/json/encoding/active_support_encoder.rb', line 161 def encode_json(encoder) #:nodoc: to_s end |