lib/voting/models/voting/extension.rb in voting-0.2.0 vs lib/voting/models/voting/extension.rb in voting-0.3.0
- old
+ new
@@ -54,10 +54,10 @@
end
end
module ClassMethods
def voting(as: nil, scoping: nil)
- after_save -> { voting_warm_up scoping: scoping }, unless: -> { as == :author }
+ after_create -> { voting_warm_up scoping: scoping }, unless: -> { as == :author }
has_many :voting_records,
as: :resource,
class_name: '::Voting::Voting',
dependent: :destroy