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
- YjVmMmJjZWJjNzkyZTkzNzYzMzYzM2I5MjRmNDczYWZhNDBmZTFjYw==
4
+ OGIyNDNjMzdkOWQ5MjQxNzhjYzJjN2UwN2M4MDI1NmRlZWZjNGRlOA==
5
5
  data.tar.gz: !binary |-
6
- YzEwZjVjYzU3NDg4ZjJkZGYxZGZkZjk1MTBiY2M0ZjJjYjM0MGYzYg==
6
+ YjFmMzhhMzIzOGRhMWY4MjgwN2I1MWI3ZDQ3Y2U2MTAxNzU2NWMwMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODQ5YjFkMjhhOGIxMWU5ZTNmM2VlNGI5NzM2YzAxMjBhYTQ1YzIwZWZlOTU5
10
- ZDk4ZDU0MGQ4MDhhYWNkNjMwMzU4MTcwMTQ0YzNkYmRkMzIyYTY5OTNkYjky
11
- YzQ1OTE5ZGM4MmUxOTFkODEzZjQ2MDRhMDJhMjBhNWRlYWIzYzY=
9
+ ZTljOTMxZmQxMjMzYmQzNWJjOGUzMDgzYzJmMzI5ODU2OTExZmMzMjRmOTAy
10
+ NmE5MWY2ZThkMGVlOTM1YWFkMmUyOWRkZGM3NDBiMjkzZTc1MGMwYTA5NTIy
11
+ YzBkNjgzYWMwMDVmZmZjZjg3ZTkwYThlOGNmMGJlMmQ5NjhkMmE=
12
12
  data.tar.gz: !binary |-
13
- MzRjNDA5ZWU5OGM0YjNjNzk3MmNhNTQwZTc1ZjBlNzBmM2EzNTI4NDdhMzY0
14
- ODAxMTNhNWE3NjJjZmEzMzgzZjUwZWI0OTdjYzVjOTI2ZjQxMTgyYzE4YzJk
15
- NGY1MjkzMmNiMjg4ZGM5YjkzOGZjYWE5NWFmOTllYmU2MDA0YTU=
13
+ Njk0MTIxOGY1ODM4OTI1MGU1NTM3OTQyOTI4NzFlZjI5NzNkNDQ3YWNkOGZl
14
+ OGE2ZWVkMTQzYWYyNTQwOWFiMDdiYTA5MWI5N2IyNjdkZDRmZDk5OGY5Y2Y3
15
+ ZjBjMmE2ZGRhYTM5YmMwOTlkNjQ3NWM4MWZjZTFhZjUyYjdkOWQ=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
data/activitylog.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "activitylog"
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jon Erik Suero", "Elan Dubrofsky"]
@@ -7,5 +7,5 @@ class ActivityLog < ActiveRecord::Base
7
7
  belongs_to :loggable, polymorphic: true
8
8
  belongs_to :user
9
9
 
10
- validates :type, inclusion: {in: %w(model controller)}
10
+ validates :action_type, inclusion: {in: %w(model controller)}
11
11
  end
@@ -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, type: 'model', stored_parent_activity_id: self.stored_parent_activity_id
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, type: 'controller'
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 :type
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, :type
17
+ add_index :activity_logs, :action_type
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activitylog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Erik Suero