How to insert user_id, user_name, user_type with versions of vestal?

How to embed user_id, user_name, user_type with vestal versions in the version table?

class Page < ActiveRecord::Base versioned end 
+1
source share
1 answer

You need to add the field to your version of the model: updated_by, then the plugin will do the rest. For example,

 @page.update_attributes(:body => "some cool content", :updated_by => current_user) 
+1
source

All Articles