I have a model called Product.

`p = Product.new(...) and
p.save`

I wanna acomplish the following: 

If there is another product with the same id(not pk), then we update the product, else we create a new one.

I think this can be done in a callback before\_save maybe!?

I tryied like this

```
before_save :try, on: :create

def try
   p = Product.where(id: self.id).first
   p and p.update_attributes(...) and return false
   *1
end

```

\*1, at this point, the attributes are updated, it return false that means the new model is not created, but i think the db is rolled back because the update is not saved.