Skip to content
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from pcarvalho197/master
Browse files Browse the repository at this point in the history
Save dimension in inicial rate creation
  • Loading branch information
petertoth committed Dec 20, 2013
2 parents 92bee7b + ae46de7 commit 3ef3741
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/seems_rateable/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def rate(stars, user_id, dimension=nil)
if !has_rated?(user_id, dimension)
self.rates.create do |r|
r.stars = stars
r.rater_id = user_id
r.rater_id = user_id
r.dimension = dimension
end
update_overall_average_rating(stars, dimension)
elsif has_rated?(user_id, dimension) && can_update?
Expand Down

0 comments on commit 3ef3741

Please sign in to comment.