Sha256: 5b5c70e0e3f42f08cae1d04d5f5bd4fa2aaa32fccdec2469b7395b9e6fa63377

Contents?: true

Size: 457 Bytes

Versions: 21

Compression:

Stored size: 457 Bytes

Contents

class Article < ActiveRecord::Base
  has_paper_trail :ignore => :title,
                  :only => [:content],
                  :meta   => {:answer => 42,
                              :action => :action_data_provider_method,
                              :question => Proc.new { "31 + 11 = #{31 + 11}" },
                              :article_id => Proc.new { |article| article.id } }

  def action_data_provider_method
    self.object_id.to_s
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
paper_trail-2.0.1 test/dummy/app/models/article.rb