title: Why am I getting a No Method Error in my rails app?
body: <p>I know that I'm a newbie at this and that I am not worthy, but could someone please explain to me why I am getting a No Method Error?  Here's what I did.  I generated a new migration for my database onto my existing rails app, and the migration is called "Profile". I ran db:migrate and then proceeded to edit my previous "new.html.erb" form.  The code looks like this:</p>
  
  <pre><code>class CreateProfiles &lt; ActiveRecord::Migration
    def self.up
      create_table :profiles do |t|
        t.string :major
        t.string :year
        t.string :books_sell
        t.string :books_buy
        t.string :facebook
        t.string :restaurants
        t.string :interests
  
        t.timestamps
      end
      add_index :profiles, :major
      add_index :profiles, :year
      add_index :profiles, :books_sell
      add_index :profiles, :books_buy
      add_index :profiles, :facebook
      add_index :profiles, :restaurants
      add_index :profiles, :interests
    end
  
    def self.down
      drop_table :profiles
    end
  end
  </code></pre>
  
  <p>Basically, I am adding a profile section onto my app, but I am getting this:</p>
  
  <pre><code>   undefined method `major' for #&lt;User:0x00000100b6e030&gt;
      Extracted source (around line #23):
  
      20:   &lt;/div&gt;
      21:   &lt;div class="field"&gt;
      22:     &lt;%= f.label :"major" %&gt;&lt;br /&gt;
      23:     &lt;%= f.text_field :major %&gt;
      24:   &lt;/div&gt;
  </code></pre>
  
  <p>This is my views/users/new.hmtl.erb file:</p>
  
  <pre><code>&lt;h1&gt;Sign up&lt;/h1&gt;
  
  &lt;%= form_for(@user) do |f| %&gt;
    &lt;%= render 'shared/error_messages', :object =&gt; f.object %&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :name %&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 :password %&gt;&lt;br /&gt;
      &lt;%= f.password_field :password %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :password_confirmation, "Confirmation" %&gt;&lt;br /&gt;
      &lt;%= f.password_field :password_confirmation %&gt; 
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :"year" %&gt;&lt;br /&gt;
      &lt;%= f.text_field :year %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :"major" %&gt;&lt;br /&gt;
      &lt;%= f.text_field :major %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit "Sign up" %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>What's missing?</p>