paper trail gem - Filter paper_trail version history by column -


using airblade's papertrail gem, need track changes particular model columns, need filter selectively see changes 1 particular column. make more concrete, if have file model has label attribute/column , want display label history, can right all version history file, include non-label updates other attributes. (furthermore, don't need label update itself, whodunnit , created_at associated version.)

i don't see in documentation - closest i've come adding metadata, allows me more access information attribute, doesn't return filtered collection of pertinent version history.

answer: anywhere update label column, can update paper_trail_event, e.g. file.update!(label:'foo', paper_trail_event: 'update label'). can query on event, e.g. versions.where(event: 'update label')


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -