From dfae80e652e56a37c4603913902148d9e920e32a Mon Sep 17 00:00:00 2001 From: rsl Date: Tue, 15 Apr 2008 16:51:56 -0400 Subject: [PATCH] updated callback to not intercept ham! --- lib/lucky_sneaks/acts_as_snook.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lucky_sneaks/acts_as_snook.rb b/lib/lucky_sneaks/acts_as_snook.rb index 8bc4beb..4cdf02f 100644 --- a/lib/lucky_sneaks/acts_as_snook.rb +++ b/lib/lucky_sneaks/acts_as_snook.rb @@ -39,7 +39,7 @@ def acts_as_snook(options = {}) :spam_status_field => :spam_status }.merge(options) - before_validation :calculate_snook_score + before_validation_on_create :calculate_snook_score attr_reader :snook_credits attr_protected fields_for_snooking[:spam_status_field] @@ -82,7 +82,7 @@ def moderate? end def ham! - update_attribute self.class.fields_for_snooking[:spam_status_field], "ham" + update_attribute :spam_status, "ham" end private