From 3f9d75429bb158eca77e163cf9c0424de4ecdecf Mon Sep 17 00:00:00 2001 From: f Date: Thu, 3 Mar 2022 14:14:37 -0300 Subject: [PATCH] buscar o crear la raspberry por el nombre --- 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 cc796c8..315998a 100644 --- a/app/controllers/readings_controller.rb +++ b/app/controllers/readings_controller.rb @@ -35,7 +35,7 @@ class ReadingsController < ActionController::API end def raspberry - @raspberry ||= Raspberry.find_or_create_by! params[:controller_id] + @raspberry ||= Raspberry.find_or_create_by! name: params[:controller_id] end # Procesa la transacción