README.markdown in acts_as_votable-0.9.0 vs README.markdown in acts_as_votable-0.10.0
- old
+ new
@@ -23,11 +23,11 @@
### Install
Just add the following to your Gemfile.
```ruby
-gem 'acts_as_votable', '~> 0.9.0'
+gem 'acts_as_votable', '~> 0.10.0'
```
And follow that up with a ``bundle install``.
### Database Migrations
@@ -314,25 +314,28 @@
add_column :posts, :cached_votes_total, :integer, :default => 0
add_column :posts, :cached_votes_score, :integer, :default => 0
add_column :posts, :cached_votes_up, :integer, :default => 0
add_column :posts, :cached_votes_down, :integer, :default => 0
add_column :posts, :cached_weighted_score, :integer, :default => 0
+ add_column :posts, :cached_weighted_total, :integer, :default => 0
add_index :posts, :cached_votes_total
add_index :posts, :cached_votes_score
add_index :posts, :cached_votes_up
add_index :posts, :cached_votes_down
add_index :posts, :cached_weighted_score
+ add_index :posts, :cached_weighted_total
# Uncomment this line to force caching of existing votes
# Post.find_each(&:update_cached_votes)
end
def self.down
remove_column :posts, :cached_votes_total
remove_column :posts, :cached_votes_score
remove_column :posts, :cached_votes_up
remove_column :posts, :cached_votes_down
- remove_column :posts, :cached_weighted_score
+ remove_column :posts, :cached_weighted_score
+ remove_column :posts, :cached_weighted_total
end
end
```
## Testing