Skip to content
Browse files

Store the result of the super call to active record upon a save, and …

…return that result back from our overriden method.
  • Loading branch information...
1 parent 0f308cd commit ade77d236b1376d31ed8e10c6d73ed30cd9e22b9 @Velkitor committed Mar 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/profanity_filter.rb
View
3 lib/profanity_filter.rb
@@ -50,8 +50,9 @@ class << self
#SO... lets override the save method.
define_method "save" do |*args|
unbind_profanity
- super(*args)
+ result = super(*args)
bind_profanity
+ return result
end
end
end

0 comments on commit ade77d2

Please sign in to comment.
Something went wrong with that request. Please try again.