title: Can not update ActiveRecord in rails console
body: <p>Just for experiement purpose, I typed following commends into rails console.
  I queried an arbitrary item and assign it a category_id and call "save". 
  Why, in the result, nothing has changed (category_id of the item is still null)?</p>
  
  <p>(some output has be omitted for clarity)</p>
  
  <pre><code>1.9.3-p327 :004 &gt; i = Item.first
  Item Load (0.2ms)  SELECT "items".* FROM "items" LIMIT 1
  1.9.3-p327 :005 &gt; i.category_id =1
  1.9.3-p327 :006 &gt; i.save
  (0.1ms)  begin transaction
  (0.1ms)  commit transaction
  =&gt; true 
  1.9.3-p327 :007 &gt; i
  =&gt; #&lt;Item id: 1, title: "near", price: 1000.0, photos: nil, created_at: "2013-07-31 15:19:24", updated_at: "2013-07-31 15:51:46", user_id: nil, category_id: nil, location_id: 1&gt; 
  </code></pre>
  
  <p>Also tried update_attributes</p>
  
  <pre><code>1.9.3-p327 :008 &gt; i.update_attributes(:category_id =&gt; 1)
     (0.1ms)  begin transaction
     (0.1ms)  commit transaction
  =&gt; true 
  1.9.3-p327 :009 &gt; i
  =&gt; #&lt;Item id: 1, title: "near", price: 1000.0, photos: nil, created_at: "2013-07-31 15:19:24", updated_at: "2013-07-31 15:51:46", user_id: nil, category_id: nil, location_id: 1&gt; 
  </code></pre>
  
  <p>------------------------------------------------Edit ----------------------------</p>
  
  <pre><code>1.9.3-p327 :007 &gt; i.price=50
   =&gt; 50 
  1.9.3-p327 :008 &gt; i.save
     (0.1ms)  begin transaction
     (0.3ms)  UPDATE "items" SET "price" = 50.0, "updated_at" = '2013-07-31 21:28:33.643283' WHERE "items"."id" = 1
     (229.6ms)  commit transaction
   =&gt; true 
  </code></pre>
  
  <p>Try with another attribute "price", it works.
  That is to say, rails prevent manually changes to attributes end with "_id", presumably to protect foreign key?</p>
  
  <p>can anyone confirm this? or reproduce this?</p>
  
  <p>------------------------------------Edit again ---------------------------------
  Model attached</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
    attr_accessible :photos, :price, :title, :user_id, :category_id
    attr_accessor :user_id, :category_id
    belongs_to :user
    belongs_to :category
    belongs_to :location
  
  
  end
  </code></pre>