mercredi 20 juillet 2016

How to prevent writing 'object' field in PaperTrail

  1. I have many fields in my table, I don't want to version all columns. How do I skip the columns which I don't need to store any changes

I have used the following, but it stores the values in 'versions' table. In my model

class User < ActiveRecord::Base
  has_paper_trail skip: [:foo1, :foo2, :foo3]
  # tried with ignore instead of skip
end

  1. How do I prevent writing object field in 'versions' table.

Aucun commentaire:

Enregistrer un commentaire