From 55519925ce3b8dcf585aed91ac8c1d7761ce9de7 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 6 Dec 2021 20:03:04 -0300 Subject: [PATCH] Crear las raspberries ad-hoc --- app/controllers/api_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 49d3757..bb5c189 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -38,7 +38,7 @@ class ApiController < ActionController::API end def raspberry - @raspberry ||= Raspberry.find params[:controller_id] + @raspberry ||= Raspberry.find_or_create_by! params[:controller_id] end # Procesa la transacción