title: Ruby on rails - Creating a calculation form
body: <p>Im trying to create a calculation form in Ruby similiar to the picture below </p>
  
  <p>( it's a screenshot of the from that i created using HTML and Javascript codepen:</p>
  
  <p><a href="http://codepen.io/salman15/pen/pNELXM" rel="nofollow noreferrer">http://codepen.io/salman15/pen/pNELXM</a> )</p>
  
  <p><img src="https://i.imgur.com/KyvAg5j.png" alt="a busy cat"></p>
  
  <p>It's suppose to work like this</p>
  
  <p>The budget part
  U add a budget and it get's divided by the three input fields and the results below it.</p>
  
  <p>The weightings part
  You have nine inputs field and the value's you enter there get divide the results of the previous one</p>
  
  <p>Then lastly the objectives part where you can add and remove 7 columns rows</p>
  
  <p>It's pretty complicated, but i just finished the Micheal Hart tutorial and I'm not sure how to approach this. </p>
  
  <p>I was thinking of creating one Model named Management</p>
  
  <p>But would i then have to create all the value inputs in the module?</p>
  
  <pre><code>$ rails generate model Budget budget:text weighings:text objectives:text confrences:text prob:text  user:references
  </code></pre>
  
  <p>Or should i create separate models? </p>
  
  <p>Because my Migrate looks like this and i'm not sure how the extra input value's would be saved</p>
  
  <p><strong>Migrate</strong></p>
  
  <pre><code>    class CreateBudgets &lt; ActiveRecord::Migration[5.0]
    def change
      create_table :budgets do |t|
        t.text :budget
        t.text :weighings
        t.text :objectives
        t.text :confrences
        t.text :prob
        t.references :user, foreign_key: true
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>Also I was using a code to add columns in JavaScript ( u can see it in the code pen link)</p>
  
  <p>I'm unassuming i can use JavaScript for the calculations and the results get saved once i press submit?</p>