title: Rails: Ignoring non-existant attributes passed to create()
body: <p>I have the following Rails model:</p>
  
  <pre><code>class CreateFoo &lt; ActiveRecord::Migration
    def self.up
      create_table :foo do |t|
        t.string :a
        t.string :b
        t.string :c
        t.timestamps
      end
    end
  
    def self.down
      drop_table :foo
    end
  end
  </code></pre>
  
  <p>If I try and create a new record with an additional non-existent attribute, this produces an error:</p>
  
  <pre><code>Foo.create(a: 'some', b: 'string', c: 'foo', d: 'bar')
  ActiveRecord::UnknownAttributeError: unknown attribute: d
  </code></pre>
  
  <p>Is there a way I can get create() to ignore attributes that don't exist in the model? Alternatively, what is the best way to remove non-existent attributes prior to creating the new record?</p>
  
  <p>Many thanks</p>