Flowdock
method

convert_dates_from

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveSupport::JSON
convert_dates_from(data) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/json/decoding.rb, line 58
      def convert_dates_from(data)
        case data
        when nil
          nil
        when DATE_REGEX
          begin
            DateTime.parse(data)
          rescue ArgumentError
            data
          end
        when Array
          data.map! { |d| convert_dates_from(d) }
        when Hash
          data.each do |key, value|
            data[key] = convert_dates_from(value)
          end
        else
          data
        end
      end
Register or log in to add new notes.