title: Save data to CSV file in ruby on rails
body: <p>I want to add some data which I get from user using html form to CSV file in ruby on rails. How can I do this? Here is my code for this</p>
  
  <pre><code>&lt;p&gt;
  &lt;h2&gt;Register using form below&lt;/h2&gt;
  &lt;p class="error"&gt;&lt;/p&gt;
  &lt;form action="" method="post" class="scrum-form"&gt;
  &lt;p&gt;&lt;h3&gt;Participant information&lt;/h3&gt;&lt;/p&gt;
  &lt;div&gt;
  &lt;label&gt;Full name&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="full_name" class="full_name" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Email&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="email" class="email" /&gt;
  &lt;/div&gt;
  &lt;div&gt;    
  &lt;label&gt;Phone number&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="phone" class="phone" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Organization name&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="organization" class="organization" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Job title&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="job" class="job" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Special diet&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="diet" class="diet" /&gt;
  &lt;/div&gt;
  &lt;p&gt;&lt;h3&gt;Billing information&lt;/h3&gt;&lt;/p&gt;
  &lt;div&gt;
  &lt;label&gt;Address&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;textarea cols="40" rows="5" name="address" name="address" class="address"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Postal code&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="code" class="code" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;City&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="city" class="city" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;label&gt;Cost pool or reference&lt;span class="mandatory"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input type="text" name="cost_pool" class="cost_pool" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;input type="button" name="register" value="Register" onclick="registration();" /&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>here is my action code</p>
  
  <pre><code>full_name = params["full_name"]
  email = params["email"]
  phone = params["phone"]
  organization = params["organization"]
  job = params["job"]
  diet = params["diet"]
  address = params["address"]
  code = params["code"]
  city = params["city"]
  cost_pool = params["cost_pool"]
  </code></pre>