Testing PaperTrail Custom Version Associations in rails_admin
This test file validates PaperTrail integration with custom version associations in a Rails Admin context. It tests the proper configuration and functionality of PaperTrail versioning when using a custom class name for version records.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
railsadminteam/rails_admin
spec/dummy_app/app/active_record/paper_trail_test_with_custom_association.rb
# frozen_string_literal: true
class PaperTrailTestWithCustomAssociation < ActiveRecord::Base
self.table_name = :paper_trail_tests
has_paper_trail versions: {class_name: 'Trail'}
end