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
class Product < ApplicationRecord
has_one :menu
audited
has_associated_audits
end
class Menu < ApplicationRecord
belongs_to :product
has_many :menu_items
audited associated_with: :product
has_associated_audits
end
class MenuItem < ApplicationRecord
belongs_to :menu
audited associated_with: :menu
end
And we want to see audits information against our Product when either the Menu or MenuItem is updated. We can see the Menu changes being displayed in the audits, but the MenuItem updates aren't coming through so seems it doesn't see them as an association through the Menuassociated_with.
Does the Audited gem only support one-level deep associations? Or do we need to link the MenuItem to the Product (even though it doesn't have a direct relation to it).
The text was updated successfully, but these errors were encountered:
We have a model structure like this in our app:
And we want to see audits information against our
Product
when either theMenu
orMenuItem
is updated. We can see theMenu
changes being displayed in the audits, but theMenuItem
updates aren't coming through so seems it doesn't see them as an association through theMenu
associated_with
.Does the Audited gem only support one-level deep associations? Or do we need to link the
MenuItem
to theProduct
(even though it doesn't have a direct relation to it).The text was updated successfully, but these errors were encountered: