I'm working on a simple rails app. The user enters two separate integers and when they press 'create', the 'show' page displays the two values and a third value which is calculated from the user input. I have put the arithmetic to calculate the third value in the 'show' html.erb view, but I can't work out how to add the third value into the database. Heres my code for the 'show' view:`
Name: <%= @startup.name %>
<p>
<strong>Revenue:</strong>
<%= @startup.revenue %>
</p>
<p>
<strong>Costs:</strong>
<%= @startup.costs %>
</p>
<h2>
<strong>Profit:</strong>
<%= @startup.profit = @startup.revenue - @startup.costs %>