'track history of active record changes and its association
I want to track the history the active record and association. I have a many to many
association:
class BookList
has_many :book_list_items
has_many :books, through: :book_list_items
end
class BookListItem
belongs_to :book
belongs_to :book_list
attr_accessable :position
end
class Book
has_many :book_list_items
has_many :book_lists, through: :book_list_items
end
how do I track the history of BookList like this:
- add book to a book list
- remove book from a book list
- update position of a book in a book list
how do I implement this structure
Solution 1:[1]
You can also try active_snapshot. It is a much simpler and easy to use gem for model and its associations tracking for ruby and rails applications
I understand the question is too old for this answer, but this might help someone else
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Suleman Uzair |
