norman/friendly_id — Issue #185: accepts_nested_attributes_for
Author: emrekutlu
Created: 2011-11-15 14:32:22+00:00
State: open

```ruby
class Author < ActiveRecord::Base
belongs_to :publication, :polymorphic => true
friendly_id :name, :use => :slugged
end
```
```ruby
class Book < ActiveRecord::Base
has_many :authors, :as => :publication
accepts_nested_attributes_for :authors
end
```

I am using "4.0.0.beta14". I have a form for Book model which also can add multiple authors. Author model's slug column has an unique index.

When i try to add multiple authors whose name is same, all authors try to get the same slug, so a "Mysql2::Error: Duplicate entry" occurs.