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

Save dimension in inicial rate creation #3

Merged
merged 1 commit into from
Dec 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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