Commit da711118dce788a6a3d966fec629c5c6f336d9f6
1 parent
cebfa204
Exists in
master
and in
29 other branches
spammable: improve error message
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/spammable.rb
1 | 1 | module Spammable |
2 | 2 | def self.included(recipient) |
3 | - raise "This model should have a spam attribute!" if !recipient.new.respond_to?('spam=') | |
3 | + raise "This model (#{recipient.to_s}) should have a spam attribute!" if !recipient.new.respond_to?('spam=') | |
4 | 4 | recipient.extend(ClassMethods) |
5 | 5 | end |
6 | 6 | ... | ... |