title: NoMethodError: undefined method `save' rails console
body: <p>I'm learning RoR from ruby.railstutorial.org , i have created a model and when im trying to add data to it and save via rails console im getting error. (Im using mysql )</p>
  
  <p>Rails Console</p>
  
  <pre><code> User.new(username: "test", password: "test123", password_confirmation: "test123", email: "test@fs.in", role: "admin" )
   =&gt; #&lt;User id: nil, username: "test", password: "test123", email: "test@fs.in", role: "admin", created_at: "2012-01-01 00:00:00", updated_at: "2012-01-01 00:00:00", password_confirmation: "test123"&gt;
  </code></pre>
  
  <p>User.save gives below error</p>
  
  <pre><code>NoMethodError: undefined method `save' for #&lt;Class:0x0000000422b628&gt; from /home/ramadas/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/activerecord-3.2.9/lib/active_record/dynamic_matchers.rb:50:in `method_missing'
  from (irb):15
  from /home/ramadas/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands/console.rb:47:in `start'
  from /home/ramadas/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands/console.rb:8:in `start'
  from /home/ramadas/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands.rb:41:in `&lt;top (required)&gt;'
  from script/rails:6:in `require'
  from script/rails:6:in `&lt;main&gt;'
  </code></pre>
  
  <p>My Model</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    attr_accessible :email, :password, :password_confirmation, :role, :username
    validates :username, presence: true , length: { maximum: 50 }
    VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
    validates :email, presence: true, format: { with: VALID_EMAIL_REGEX } , uniqueness: { case_sensitive: false }
    before_save { |user| user.email = email.downcase }
    before_save { |user| user.username = username.downcase }
    validates :password, presence: true, length: { minimum: 4 }
    validates :password_confirmation, presence: true
  end
  </code></pre>
  
  <p>I have checked for every possible mistake that could happen, but didnt find a solution. please help me out in figuring out and solve this.</p>