convertir el timestamp en una fecha

This commit is contained in:
f 2022-03-03 15:14:22 -03:00
parent 535191d26d
commit bf0e764f65

View file

@ -57,6 +57,8 @@ class ReadingsController < ActionController::API
def sensor_params(sensor)
sensor.permit(:timestamp, :type, :value, :unit, :error).tap do |p|
p[:local_type] = p.delete :type
p[:timestamp] = Time.at p[:timestamp]
rescue TypeError
end
end
end