From f6f8962073bad37656f9c7328743deb188b453a5 Mon Sep 17 00:00:00 2001 From: Luke Barratt Date: Sun, 23 Aug 2015 15:57:37 +0100 Subject: [PATCH] Fixes removal of find_or_create_by_x in acts_as_rateable plugin --- lib/plugins/acts_as_rateable/lib/acts_as_rateable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/acts_as_rateable/lib/acts_as_rateable.rb b/lib/plugins/acts_as_rateable/lib/acts_as_rateable.rb index 645e682..a1a558d 100644 --- a/lib/plugins/acts_as_rateable/lib/acts_as_rateable.rb +++ b/lib/plugins/acts_as_rateable/lib/acts_as_rateable.rb @@ -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