title: bypass attr_accessible/protected in rails
body: <p>I have a model that, when it instantiates an object, also creates another object with the same user id.</p>
  
  <pre><code>class Foo &gt; ActiveRecord::Base
  
  after_create: create_bar
  
  private
  
  def create_bar
    Bar.create(:user_id =&gt; user_id #and other attributes)
  end
  
  end
  </code></pre>
  
  <p>In Bar.rb I have attr_protected to protect it from hackers.</p>
  
  <pre><code>class Bar &gt; ActiveRecord::Base
    attr_protected :user_id, :created_at, :updated_at
  end
  </code></pre>
  
  <p>As it stands now I can't seem to create a new Bar object without either disabling the attr_protected or having the Bar object's user_id go blank...</p>
  
  <p>How can I let the bar object accept the :user_id attribute from foo without losing protection from attr_protected?</p>