asignar la raspberry al arduino también
This commit is contained in:
parent
6930afabc8
commit
cf4dfa3aad
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ class ReadingsController < ActionController::API
|
||||||
reading.signature = headers[:'X-Signature']
|
reading.signature = headers[:'X-Signature']
|
||||||
|
|
||||||
params[:arduinos]&.each do |a|
|
params[:arduinos]&.each do |a|
|
||||||
arduino = reading.arduinos.build local_id: a[:id]
|
arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry
|
||||||
|
|
||||||
a[:sensores]&.each do |s|
|
a[:sensores]&.each do |s|
|
||||||
arduino.sensors.build(sensor_params s)
|
arduino.sensors.build(sensor_params s)
|
||||||
|
|
Loading…
Reference in a new issue