How Render data from a model inside of /views/pages/somepage.html.erb

Good morning!

I need render data from a model inside of a page “.html.erb”, i have this tree in my project:

app/models/dte.rb (this is the model with the table from i want the data)
app/controllers/dtes_controller.rb (this is the controller of the model)
app/views/dtes/index.html.erb (this is the html where is the datatable with the data)
app/views/pages/somepage.html.erb (this is the html where i need to put the datatable)

for your help, thank you

best regards

Get data 1st in dtes_controller using dte.rb model
render somepage.html.erb from dtes_controller with spcifying routes for rendering somepage.html.erb
in somepage.html.erb use varaible where you got data in controller.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs