method

normalize_distance_of_time_argument_to_time

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ActionView::Helpers::DateHelper
normalize_distance_of_time_argument_to_time(value) private

No documentation

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

Hide source
# File actionview/lib/action_view/helpers/date_helper.rb, line 692
        def normalize_distance_of_time_argument_to_time(value)
          if value.is_a?(Numeric)
            Time.at(value)
          elsif value.respond_to?(:to_time)
            value.to_time
          else
            raise ArgumentError, "#{value.inspect} can't be converted to a Time value"
          end
        end
Register or log in to add new notes.