activitylog 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGIyNDNjMzdkOWQ5MjQxNzhjYzJjN2UwN2M4MDI1NmRlZWZjNGRlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjFmMzhhMzIzOGRhMWY4MjgwN2I1MWI3ZDQ3Y2U2MTAxNzU2NWMwMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTljOTMxZmQxMjMzYmQzNWJjOGUzMDgzYzJmMzI5ODU2OTExZmMzMjRmOTAy
|
10
|
+
NmE5MWY2ZThkMGVlOTM1YWFkMmUyOWRkZGM3NDBiMjkzZTc1MGMwYTA5NTIy
|
11
|
+
YzBkNjgzYWMwMDVmZmZjZjg3ZTkwYThlOGNmMGJlMmQ5NjhkMmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Njk0MTIxOGY1ODM4OTI1MGU1NTM3OTQyOTI4NzFlZjI5NzNkNDQ3YWNkOGZl
|
14
|
+
OGE2ZWVkMTQzYWYyNTQwOWFiMDdiYTA5MWI5N2IyNjdkZDRmZDk5OGY5Y2Y3
|
15
|
+
ZjBjMmE2ZGRhYTM5YmMwOTlkNjQ3NWM4MWZjZTFhZjUyYjdkOWQ=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
data/activitylog.gemspec
CHANGED
@@ -12,7 +12,7 @@ module ActivityLogger
|
|
12
12
|
def record_model_activity_log(action)
|
13
13
|
# if current_user_id == nil, then the User is in the process of Logging In
|
14
14
|
current_id = defined?(current_user_id) ? current_user_id : nil
|
15
|
-
activity_logs.create user_id: current_id, action: action, data: changes,
|
15
|
+
activity_logs.create user_id: current_id, action: action, data: changes, action_type: 'model', stored_parent_activity_id: self.stored_parent_activity_id
|
16
16
|
end
|
17
17
|
|
18
18
|
def record_controller_activity_log
|
@@ -21,7 +21,7 @@ module ActivityLogger
|
|
21
21
|
object = controller_name.classify.constantize.find_by_id(params[:id])
|
22
22
|
return unless object.present?
|
23
23
|
return unless object.respond_to? :activity_logs
|
24
|
-
object.activity_logs.create user_id: current_user.try(:id), action: "#{params[:controller]}/#{params[:action]}", data: params,
|
24
|
+
object.activity_logs.create user_id: current_user.try(:id), action: "#{params[:controller]}/#{params[:action]}", data: params, action_type: 'controller'
|
25
25
|
self.stored_parent_activity_id = activity.id
|
26
26
|
end
|
27
27
|
|
@@ -6,7 +6,7 @@ class CreateActivityLogs < ActiveRecord::Migration
|
|
6
6
|
t.integer :loggable_type
|
7
7
|
t.string :action
|
8
8
|
t.integer :parent_activity_id
|
9
|
-
t.string :
|
9
|
+
t.string :action_type
|
10
10
|
t.binary :data, :limit => 10.megabyte
|
11
11
|
t.timestamps
|
12
12
|
end
|
@@ -14,6 +14,6 @@ class CreateActivityLogs < ActiveRecord::Migration
|
|
14
14
|
add_index :activity_logs, [:loggable_id, :loggable_type]
|
15
15
|
add_index :activity_logs, :user_id
|
16
16
|
add_index :activity_logs, :parent_activity_id
|
17
|
-
add_index :activity_logs, :
|
17
|
+
add_index :activity_logs, :action_type
|
18
18
|
end
|
19
19
|
end
|