Sha256: fb0f2abc4ddf90ef1dc95bbcc63696e22fd05d6baaa330ed3d73e9673e5eb8f0

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

class Post < ActiveRecord::Base
  
  belongs_to :user
  include Warrant::App::Models::Warrantable
  obscure :title
  obscure :body,    :if     => :should_obscure_body?
  obscure :keyword, :unless => :should_not_obscure_keyword?
  obscure :spam,    :with   => :obscure_spam_with
  
  def should_not_obscure_keyword?
    false
  end
  
  def should_obscure_body?
    true
  end
  
  def obscure_spam_with
    'Nothing to see here'
  end
  
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gsterndale-warrant-0.2.0 test/rails_root/app/models/post.rb
gsterndale-warrant-0.3.0 test/rails_root/app/models/post.rb