Our manual implementation had a few issues. In particular, it didn't track changes related to associations, which became more of an issue when we made investments translatable. Using audited gives us more functionality while at the same time simplifies our code. However, it adds one more external dependency to our project. The reason for choosing audited over paper trail is audited seems to make it easier to handle associations.
14 lines
319 B
Ruby
14 lines
319 B
Ruby
class DropBudgetInvestmentChangeLogs < ActiveRecord::Migration[5.0]
|
|
def change
|
|
drop_table :budget_investment_change_logs do |t|
|
|
t.integer :investment_id
|
|
t.integer :author_id
|
|
t.string :field
|
|
t.string :new_value
|
|
t.string :old_value
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|