title: Rails 3 : How to insert Record in Database using Rails
body: <p>I am new to Rails , i am trying to learn this technology , so please excuse if the question is dumb .</p>
  
  <p>I am using Rails 3 .</p>
  
  <p>Please let me know how can i insert a Record in the Database .</p>
  
  <p>I am uisng postgresql , and below is my Table structure for the Students Table .</p>
  
  <pre><code>SELECT column_name FROM information_schema.columns WHERE table_name ='Students';
  
   column_name
  -------------
   id
   name
   age
   description
  (4 rows)
  </code></pre>
  
  <p><strong>This is my Controller file student_controller.rb</strong></p>
  
  <pre><code>class StudentController &lt; ApplicationController
  
    def new
    end
  
  end
  </code></pre>
  
  <p><strong>This is my Model file student.rb</strong></p>
  
  <pre><code>class Student &lt; ActiveRecord::Base
  
  end
  </code></pre>
  
  <p><strong>This is my view file under \app\views\student\new.html.erb</strong></p>
  
  <pre><code>&lt;h1&gt;BookController#new&lt;/h1&gt;
  &lt;form&gt;
    Id: &lt;input type="text" name="id" /&gt;&lt;br /&gt;
   Last Name: &lt;input type="text" name="lastname" /&gt;
    Age: &lt;input type="text" name="age" /&gt;
    Desciption: &lt;input type="text" name="description" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When i access <code>http://localhost:3000/student/new</code> </p>
  
  <p>Please let me know how can i insert a Record in Database ??</p>