Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: collectiveidea/audited
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: podia/audited
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Feb 4, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8c86f10 View commit details
  2. Merge pull request #1 from podia/optional-associations

    Make user/associated associations optional
    mariozugaj authored Feb 4, 2025
    Copy the full SHA
    89c7886 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/audited/audit.rb
4 changes: 2 additions & 2 deletions lib/audited/audit.rb
Original file line number Diff line number Diff line change
@@ -41,8 +41,8 @@ def text_column?

class Audit < ::ActiveRecord::Base
belongs_to :auditable, polymorphic: true
belongs_to :user, polymorphic: true
belongs_to :associated, polymorphic: true
belongs_to :user, polymorphic: true, optional: true
belongs_to :associated, polymorphic: true, optional: true

before_create :set_version_number, :set_audit_user, :set_request_uuid, :set_remote_address