buscar o crear la raspberry por el nombre

This commit is contained in:
f 2022-03-03 14:14:37 -03:00
parent 8de7a8a74c
commit 3f9d75429b

View file

@ -35,7 +35,7 @@ class ReadingsController < ActionController::API
end end
def raspberry def raspberry
@raspberry ||= Raspberry.find_or_create_by! params[:controller_id] @raspberry ||= Raspberry.find_or_create_by! name: params[:controller_id]
end end
# Procesa la transacción # Procesa la transacción