lib/acts_as_spammable/active_record/base.rb
def known_spam?
      if self.is_a?(GuideTaxon)
        # guide taxa can have many sections, each of which could be spam,
        # so when one is spam consider the entire GuideTaxon as spam
        if self.guide_sections.any?{ |s| s.flagged_as_spam? }
          return true
        end
        return false
      end
      if (self.respond_to?(:flagged_as_spam?) && self.flagged_as_spam?)
        return true
      end
      false
    end
# it would be nice to use flagged_as_spam? directly
# but GuideTaxon is a weird case of something that is spam
# only because of association - its not directly flagged
it would be nice to use flagged_as_spam. directly
but GuideTaxon is a weird case of something that is spam
only because of association - its not directly flagged
it would be nice to use flagged_as_spam . directly but GuideTaxon is a weird case of something that is spam only because of association - its not directly flagged
def known_spam?
      if self.is_a?(GuideTaxon)
        if self.guide_sections.any?{ |s| s.flagged_as_spam? }
          return true
        end
        return false
      end
      if (self.respond_to?(:flagged_as_spam?) && self.flagged_as_spam?)
        return true
      end
      false
    end
def known_spam? if self . is_a? ( GuideTaxon ) if self . guide_sections . any? { | s | s . flagged_as_spam? } return true end return false end if ( self . respond_to? ( :flagged_as_spam? ) && self . flagged_as_spam? ) return true end false end
it would be nice to use flagged_as_spam?
it would be nice to use flagged_as_spam?
# guide taxa can have many sections, each of which could be spam, # so when one is spam consider the entire GuideTaxon as spam