title: Ruby on rails scaffold error in _form.html.erb
body: <p>This CURD generated by scaffold method using following command</p>
  
  <pre><code>rails g scaffold contact fullname:string surname:string email:string mobile:string note:text
  </code></pre>
  
  <p>when i go to localhost:3003/contacts/new getting following error</p>
  
  <pre><code>    NoMethodError in Contacts#new
  
  Showing /root/contactlist/app/views/contacts/_form.html.erb where line #16 raised:
  
  undefined method `fullname' for #&lt;Contact:0xb2fa75b4&gt;
  
  Extracted source (around line #16):
  
  13: 
  14:   &lt;div class="field"&gt;
  15:     &lt;%= f.label :fullname %&gt;&lt;br /&gt;
  16:     &lt;%= f.text_field :fullname %&gt;
  17:   &lt;/div&gt;
  18:   &lt;div class="field"&gt;
  19:     &lt;%= f.label :surname %&gt;&lt;br /&gt;
  
  Trace of template inclusion: app/views/contacts/new.html.erb
  
  Rails.root: /root/contactlist
  Application Trace | Framework Trace | Full Trace
  
  app/views/contacts/_form.html.erb:16:in `_app_views_contacts__form_html_erb___387033993__645411558'
  app/views/contacts/_form.html.erb:1:in `_app_views_contacts__form_html_erb___387033993__645411558'
  app/views/contacts/new.html.erb:3:in `_app_views_contacts_new_html_erb__1061805842__644918458'
  app/controllers/contacts_controller.rb:29:in `new'
  </code></pre>
  
  <p>This is my views/contacts/_form.html.erb</p>
  
  <pre><code>    &lt;%= form_for(@contact) do |f| %&gt;
    &lt;% if @contact.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
        &lt;h2&gt;&lt;%= pluralize(@contact.errors.count, "error") %&gt; prohibited this contact from being saved:&lt;/h2&gt;
  
        &lt;ul&gt;
        &lt;% @contact.errors.full_messages.each do |msg| %&gt;
          &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;div class="field"&gt;
      &lt;%= f.label :fullname %&gt;&lt;br /&gt;
      &lt;%= f.text_field :fullname %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :surname %&gt;&lt;br /&gt;
      &lt;%= f.text_field :surname %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :email %&gt;&lt;br /&gt;
      &lt;%= f.text_field :email %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :mobile %&gt;&lt;br /&gt;
      &lt;%= f.text_field :mobile %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :note %&gt;&lt;br /&gt;
      &lt;%= f.text_area :note %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>this is the Controller file "contacts_controller.rb"</p>
  
  <pre><code> class ContactsController &lt; ApplicationController
        # GET /contacts
        # GET /contacts.json
        def index
          @contacts = Contact.all
  
          respond_to do |format|
            format.html # index.html.erb
            format.json { render :json =&gt; @contacts }
          end
        end
  
        # GET /contacts/1
        # GET /contacts/1.json
        def show
          @contact = Contact.find(params[:id])
  
          respond_to do |format|
            format.html # show.html.erb
            format.json { render :json =&gt; @contact }
          end
        end
  
        # GET /contacts/new
        # GET /contacts/new.json
        def new
          @contact = Contact.new
  
          respond_to do |format|
            format.html # new.html.erb
            format.json { render :json =&gt; @contact }
          end
        end
  
        # GET /contacts/1/edit
        def edit
          @contact = Contact.find(params[:id])
        end
  
        # POST /contacts
        # POST /contacts.json
        def create
          @contact = Contact.new(params[:contact])
  
          respond_to do |format|
            if @contact.save
              format.html { redirect_to @contact, :notice =&gt; 'Contact was successfully created.' }
              format.json { render :json =&gt; @contact, :status =&gt; :created, :location =&gt; @contact }
            else
              format.html { render :action =&gt; "new" }
              format.json { render :json =&gt; @contact.errors, :status =&gt; :unprocessable_entity }
            end
          end
        end
  
        # PUT /contacts/1
        # PUT /contacts/1.json
        def update
          @contact = Contact.find(params[:id])
  
          respond_to do |format|
            if @contact.update_attributes(params[:contact])
              format.html { redirect_to @contact, :notice =&gt; 'Contact was successfully updated.' }
              format.json { head :no_content }
            else
              format.html { render :action =&gt; "edit" }
              format.json { render :json =&gt; @contact.errors, :status =&gt; :unprocessable_entity }
            end
          end
        end
  
    # DELETE /contacts/1
    # DELETE /contacts/1.json
    def destroy
      @contact = Contact.find(params[:id])
      @contact.destroy
  
      respond_to do |format|
        format.html { redirect_to contacts_url }
        format.json { head :no_content }
      end
    end
  end
  </code></pre>
  
  <p>This is the Model file "contact.rb"</p>
  
  <pre><code>class Contact &lt; ActiveRecord::Base
    attr_accessible :email, :fullname, :mobile, :note, :surname
  end
  </code></pre>
  
  <p>Please help me solve this error i'm stuck.</p>