title: ruby Online Quote app
body: <p>I am trying to build an online quote app for roofing.  I have a controller called Cost that has squarecost and squaresell.  There are other models and controllers for gable, shingle, ridgevent and more with similar fields.  These additional models and controllers are the add ons for the quote. </p>
  
  <p>Ideally, sales person would create a new quote.  Enter customer info and it would ask for length "L", width "W" and pitch "P".  There would be check boxes for the add ons.  When sales clicks "continue" they are taken to the new page (addon.html.erb) with the L, W and P which is passed along and all the add ons that where checked on from the page before (in render partials).</p>
  
  <p>Quote holds L, W and P, along other things like customer name, email, etc.  Inside of quotes I have a function called getsquare and it gets the area from (LxW)xP, where P == 1.03 (this number depends on how much of a pitch a roof has.)  The reason Quote stores L, W and P is because if a material like Roof Vent is checked, then it gets the L from the roof to calculate how much material is needed.</p>
  
  <p>How can I get the form to pass the L, W and P from the first page on to the second where it now displays all the add ons that where selected?  </p>
  
  <p>Also, I have having problems doing math functions.  I have the vision on what I want to do, but can't seem to get it done.  For example, (@length * @width) * @pitch = "currentsquare".  Currentsquare is holder because if Gable is checked then I need to add the Gable squares to the total (Gable also has "(L * W)*P = gablesquare", and at the end of the form I have a "currentsquare + gablesquare = totalsquares" and totalsquares is a field in Quotes. Where can I find the wiki for math functions and helpers for this?  All I find is helpers like Math.floor, Math.log, etc.</p>
  
  <p>I know a lot of this can be done with Java but, trying to avoid java so it can also be used with cell phones.</p>