1
votes

I'm trying to log the change events of a model in a separate database using papertrail.

I'm using Rails 4.1.2

Ruby 2.1

Papertrail 4.0.0

Below is the code i have added in concerns

module Foo
  class Base < ActiveRecord::Base
  end

 class Version < Base
  include PaperTrail::VersionConcern
 end

 class Topic < Base
   has_paper_trail class_name: 'Foo::Version'
 end
end
Foo::Base.establish_connection(:trail_development)

I have included this Foo in topic.rb

class Topic < ActiveRecord::Base
  include Foo
end

When im trying to create, edit or delete a topic, this isnt working.

Reference https://github.com/airblade/paper_trail/pull/289

You say "this isnt [sic] working". What happens? Do you get an error? - Jared Beck