Automatically transfer table values

Dear Ruby-Community,

I m currently in the final days of an assignment where we’re required to
program a linear optimization app.

However, right now I m desperately trying to create a table, where you
can enter a value anywhere (via best-in-place) in a certain coloumn and
it automatically gets transferred to all the other cells in this very
coloumn.

So imagine I enter a value in a coloum called “storage costs” once.
Since these storage costs are valid for all periods (period = my
indexes), I want them to be transferred automatically to all the
remaining storage cost cells. Here’s what I tried… with an utter
failure.

<% @product_bs.each do |product_b| %>





<% end %>
<% @product_bs.first do |p| %>



<% end %>

Period Demand Opening inventory Storage cost Production coefficient labour Production coefficient machines
<%= best_in_place product_b, :id %> <%= best_in_place product_b, :demand %> <%= best_in_place product_b, :opening_inventory %> <%= best_in_place p, :storage_cost %> <%= best_in_place p, :production_coefficient_labour %> <%= best_in_place p, :production_coefficient_machines %>

Please Help!