cirandas.net

ref: master

plugins/anti_spam/lib/anti_spam_plugin/suggest_article_wrapper.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
class AntiSpamPlugin::SuggestArticleWrapper < AntiSpamPlugin::Wrapper

  alias_attribute :author, :name
  alias_attribute :author_email, :email
  alias_attribute :user_ip, :ip_address

  def content
    article && article[:body]
  end


  def self.wraps?(object)
    object.kind_of?(SuggestArticle)
  end
end