Flowdock
method

read_time_parameter_value

Importance_0
v3.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::Base
  • 1.0.0
  • 1.1.1
  • 1.1.6
  • 1.2.0
  • 1.2.6
  • 2.0.0
  • 2.0.3
  • 2.1.0
  • 2.2.1
  • 2.3.2
  • 2.3.8
  • 3.0.0
  • 3.0.5
  • 3.0.9
  • 3.1.0 (0)
  • 3.2.1
  • 3.2.3
  • 3.2.8
  • 3.2.13
  • 4.0.2
  • 4.1.8
  • What's this?
read_time_parameter_value(name, values_hash_from_param) private

No documentation

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

Hide source
# File activerecord/lib/active_record/base.rb, line 2042
      def read_time_parameter_value(name, values_hash_from_param)
        # If Date bits were not provided, error
        raise "Missing Parameter" if [1,2,3].any?{|position| !values_hash_from_param.has_key?(position)}
        max_position = extract_max_param_for_multiparameter_attributes(values_hash_from_param, 6)
        set_values = (1..max_position).collect{|position| values_hash_from_param[position] }
        # If Date bits were provided but blank, then default to 1
        # If Time bits are not there, then default to 0
        [1,1,1,0,0,0].each_with_index{|v,i| set_values[i] = set_values[i].blank? ? v : set_values[i]}
        instantiate_time_object(name, set_values)
      end
Register or log in to add new notes.