Sha256: 4e8972adfddde461072e45a65e5e30e39b36f432d929786538e943ec0829284a

Contents?: true

Size: 576 Bytes

Versions: 17

Compression:

Stored size: 576 Bytes

Contents

class Article < ActiveRecord::Base
  has_paper_trail(
    ignore: [
      :title, {
        abstract: proc { |obj|
          ["ignore abstract", "Other abstract"].include? obj.abstract
        }
      }
    ],
    only: [:content, { abstract: proc { |obj| obj.abstract.present? } }],
    skip: [:file_upload],
    meta: {
      answer: 42,
      action: :action_data_provider_method,
      question: proc { "31 + 11 = #{31 + 11}" },
      article_id: proc { |article| article.id },
      title: :title
    }
  )

  def action_data_provider_method
    object_id.to_s
  end
end

Version data entries

17 entries across 16 versions & 2 rubygems

Version Path
paper_trail-7.0.3 test/dummy/app/models/article.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-7.0.2/test/dummy/app/models/article.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/test/dummy/app/models/article.rb
paper_trail-7.0.2 test/dummy/app/models/article.rb
paper_trail-7.0.1 test/dummy/app/models/article.rb
paper_trail-7.0.0 test/dummy/app/models/article.rb
paper_trail-6.0.2 test/dummy/app/models/article.rb
paper_trail-6.0.1 test/dummy/app/models/article.rb
paper_trail-6.0.0 test/dummy/app/models/article.rb
paper_trail-5.2.3 test/dummy/app/models/article.rb
paper_trail-5.2.2 test/dummy/app/models/article.rb
paper_trail-5.2.1 test/dummy/app/models/article.rb
paper_trail-5.2.0 test/dummy/app/models/article.rb
paper_trail-5.1.1 test/dummy/app/models/article.rb
paper_trail-5.1.0 test/dummy/app/models/article.rb
paper_trail-5.0.1 test/dummy/app/models/article.rb
paper_trail-5.0.0 test/dummy/app/models/article.rb