Luis Cuevas

Joined

1,400 Experience
13 Lessons Completed
0 Questions Solved

Activity

Hello, you have a great community in Gorails. I have a Rails View with 3 numerical integer indicators: speed, temperature and pressure.
These values ​​are stored in SavedObject model as serialized objects. And in the controller are passed to the view with their respective instance variables. @speed @temperature @pressure

The question

How can I send a separate broadcast (with turbo hotwire) for each serialized object conditioned by the "name" column (like "Device 2 Temperature") , when this is updated, so each broadcast reach to their own partial? (there are three different partials in the same view)

This is the model

class SavedObject < ApplicationRecord
serialize :value
end

These are the columns.

t.string :name
t.text :value

Record Example

id: 144,
name: "Device 2 Temperature",
value: [{last_value: "52", equip_id: 2}]```

Is there any GoRails video tutorial about how to integrate custom css/bootstrap/js template in Ruby on Rails web application?