diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-26 20:39:16 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-26 21:25:54 +0000 |
commit | e3c382e3d69e7f25593cf45a4acc1b74bb93d057 (patch) | |
tree | 5cc3260c9ee723fb91e54b71ff64633e2af2deb2 /activesupport/lib/active_support/json | |
parent | ef17225173131541f0f5495ea31fc51ea46cb236 (diff) | |
download | rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.tar.gz rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.tar.bz2 rails-e3c382e3d69e7f25593cf45a4acc1b74bb93d057.zip |
Rename subsecond_fraction_digits option to time_precision
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index 23896316e2..bafd629848 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -4,7 +4,7 @@ require 'active_support/core_ext/module/delegation' module ActiveSupport class << self delegate :use_standard_json_time_format, :use_standard_json_time_format=, - :subsecond_fraction_digits, :subsecond_fraction_digits=, + :time_precision, :time_precision=, :escape_html_entities_in_json, :escape_html_entities_in_json=, :encode_big_decimal_as_string, :encode_big_decimal_as_string=, :json_encoder, :json_encoder=, @@ -106,9 +106,9 @@ module ActiveSupport # as a safety measure. attr_accessor :escape_html_entities_in_json - # Configures the inclusion of subsecond resolution when serializing instances - # of ActiveSupport::TimeWithZone. - attr_accessor :subsecond_fraction_digits + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + attr_accessor :time_precision # Sets the encoder used by Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. |