airblade/paper_trail — Issue #133: Event not getting passed
Author: 211ct
Created: 2012-02-23 22:26:20+00:00
State: open

Using paper_trail 2.6.0, trying set up a custom class

class ProviderVersion < Version
set_table_name :provider_versions
end

code in the model:
class Provider < ActiveRecord::Base
has_paper_trail :class_name => 'ProviderVersion'
....
end

When it tries to do something on the model (update), I get an error -
Column 'event' cannot be null: INSERT INTO `provider_versions` (`item_type`, `item_id`, `event`, `whodunnit`, `site`, `object`, `created_at`) VALUES ('Provider', 29, NULL, NULL, NULL, NULL, '2012-02-23 17:22:04')

If I comment out the custom class, the change gets saved correctly in the general versions table.