You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
regarding to associated audits i have this setup for a polymorphic association and it's working well:
class Memo < ApplicationRecord
belongs_to :memo_writer, polymorphic: true, required: true
audited associated_with: :memo_writer
end
class Employee < ApplicationRecord
audited
has_many :memos, as: :memo_writer
has_associated_audits
end
Problem
Now i want to exclude all created_at and updated_at on application record level for the whole database:
class ApplicationRecord < ActiveRecord::Base
audited except: [:created_at, :updated_at]
end
At the point there is placed any audited on the super class (ApplicationRecord) audited doesn't fillup the columns associated_id and associated_type on the audits table and associated audits are no more working.
Suggestion
it'd be fine if there'd be the option for setting defaults that can be overriden in the model.
The text was updated successfully, but these errors were encountered:
Hi,
regarding to associated audits i have this setup for a polymorphic association and it's working well:
Problem
Now i want to exclude all
created_at
andupdated_at
on application record level for the whole database:At the point there is placed any
audited
on the super class (ApplicationRecord) audited doesn't fillup the columnsassociated_id
andassociated_type
on the audits table and associated audits are no more working.Suggestion
it'd be fine if there'd be the option for setting defaults that can be overriden in the model.
The text was updated successfully, but these errors were encountered: