-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Artur Beljajev
committed
Jun 26, 2019
1 parent
f5ab781
commit 7fdaf1d
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
class Action < ActiveRecord::Base | ||
has_paper_trail | ||
|
||
belongs_to :user | ||
belongs_to :contact | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class ActionVersion < PaperTrail::Version | ||
self.table_name = :log_actions | ||
self.sequence_name = :log_actions_id_seq | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class CreateLogActions < ActiveRecord::Migration | ||
def change | ||
create_table :log_actions do |t| | ||
t.string :item_type, null: false | ||
t.integer :item_id, null: false | ||
t.string :event, null: false | ||
t.string :whodunnit | ||
t.jsonb :object | ||
t.jsonb :object_changes | ||
t.datetime :created_at | ||
t.string :session | ||
t.jsonb :children | ||
t.string :uuid | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters