CodeMontageHQ/codemontage — pull request #275 by steverob (2014-12-08 20:35:09+00:00)
Title: added validations and unique index to allow users to fav projects only once

Been a long time since I worked on this! :smile:. Here's the thing I had promised to do here #224 :heart:

Code to clear out duplicates:

``` ruby
FavoriteProject.all.group_by(&:user_id).each do |user, fav|
fav.pop
fav.each(&:destroy)
end
```

Hope this is fine! :)