mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Fixes removal of find_or_create_by_x in acts_as_rateable plugin
This commit is contained in:
parent
7738c2b845
commit
f6f8962073
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ module ActiveRecord
|
|||
# Rates the object by a given score. A user object can be passed to the method.
|
||||
def rate_it( score, user_id )
|
||||
return unless score
|
||||
rate = Rate.find_or_create_by_score( score.to_i )
|
||||
rate = Rate.find_or_create_by(score: score.to_i)
|
||||
rate.user_id = user_id
|
||||
rates << rate
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue