kinopyo/quoty — pull request #56 by kinopyo (2013-08-08 17:31:14+00:00)
Title: Refactor Vote to Like

Finally,,, time to change Vote to Like!

## Operations after this deploy

### Update data

```ruby
Vote.where(score: 1).each do |vote|
vote.build_like do |like|
like.user = vote.user
like.quote = vote.quote

like.save
end
end

PublicActivity::Activity.where(trackable_type: 'Vote').each do |a|
if a.trackable.score == -1
a.destroy
end
end

PublicActivity::Activity.where(trackable_type: 'Vote').each do |a|
like_id = Like.find_by(vote_id: a.trackable_id).id
a.update(trackable_type: 'Like', key: 'like.create', trackable_id: like_id)
end
```

### TODO
- [ ] Remove :vote_id from Like
- [ ] Remove Vote model
- [ ] Add PublicActivity behavior to Like