I'm creating an app where users can create embeddable forms that collect contacts for them (email subscribers).

When the user gets a new email subscriber, a new contact is created with the email address, and the contact is associated with the user and the form it was create through. 

However right now if the same email gets entered twice, it creates a new contact, instead of updating an existing contact associated with the user.

In my `Contacts` controller, I'm trying to use the `first_or_create` function to check if the user already has a contact with that email address, before creating a new one.

```
def create

      @user = @form.user
      @contact = Contact.where(:user_id => @user, :email => :email).first_or_create(contact_params)
      @contact.user = current_user
      respond_to do |format|
        if @contact.save
          format.html { redirect_to :back, notice: 'New contact created!' }
          format.json { render :show, status: :created, location: @contacts }
        else
          format.html { render :new }
          format.json { render json: @contact.errors, status: :unprocessable_entity }
        end
      end
end

```

While this doesn't return an error when creating a contact, it still creates a duplicate contact.

How do I properly do this?

NOTES: As you can see, I'm also trying to pass `contact_params`, which includes important information like the contacts name, etc.

Here's the models for reference...

```
class User < ActiveRecord::Base
  has_many :forms, :dependent => :destroy
  has_many :contacts, :dependent => :destroy
end

class Contact < ActiveRecord::Base  
belongs_to :user
belongs_to :contactable, polymorphic: true
end

class Form < ActiveRecord::Base
    belongs_to :user
    has_many :contacts, as: :contactable
end

```

Thanks for any help.