up: avoid inverse merge
parent
bff0655f37
commit
0056d7eaad
|
@ -34,9 +34,7 @@ module Rating
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.rate_for(author:, extra_scopes: {}, resource:, scopeable: nil)
|
def self.rate_for(author:, extra_scopes: {}, resource:, scopeable: nil)
|
||||||
attributes = { author: author, resource: resource, scopeable: scopeable }.merge(extra_scopes)
|
find_by extra_scopes.merge(author: author, resource: resource, scopeable: scopeable)
|
||||||
|
|
||||||
find_by attributes
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue