instance method
read_time_parameter_value
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.1.12 PrivateSignature
read_time_parameter_value(name, values_hash_from_param)
No documentation comment.
Parameters
-
namereq -
values_hash_from_paramreq
Source
# File activerecord/lib/active_record/base.rb, line 2059
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
Defined in activerecord/lib/active_record/base.rb line 2059
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base