From 3a1b78f238853ad07729d7921fd432bc92c9aa99 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 13 May 2022 12:54:41 -0300 Subject: [PATCH] convertir valores en enteros antes de procesarlos --- app/controllers/readings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/readings_controller.rb b/app/controllers/readings_controller.rb index b927770..f196e82 100644 --- a/app/controllers/readings_controller.rb +++ b/app/controllers/readings_controller.rb @@ -73,7 +73,7 @@ class ReadingsController < ActionController::API :sample, :signature, coordinates: %i[lat lng]).tap do |p| - p[:timestamp] = Time.at p[:timestamp] + p[:timestamp] = Time.at p[:timestamp].to_i rescue TypeError end end