presumed_spam.rb
来自「用ruby on rails写的一个博客程序,还不错..ruby on rail」· RB 代码 · 共 36 行
RB
36 行
module ContentState class PresumedSpam < Base include Singleton def enter_hook(content) super content[:published] = false content[:status_confirmed] = false end def is_spam?(content) true end def mark_as_ham(content) content.state = Factory.new(:just_marked_as_ham) end def mark_as_spam(content) content.state = Factory.new(:spam) end def withdraw(content) content.mark_as_spam end def confirm_classification(content) content.mark_as_spam end def to_s "Spam?" end endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?