effective_logging 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 367d93432e76ac07019710a95ff77cc5b29dee70
4
- data.tar.gz: 234bed1f809b345e3843785b0f79ef71856388f9
3
+ metadata.gz: 00722263c1f4a6f4354ed1367ad85b41e2b2ad83
4
+ data.tar.gz: 3f2430009e0340a134893597ab3b0aea685ff3e4
5
5
  SHA512:
6
- metadata.gz: 576527f40fee8e2ba1169f35bed58dbd9ace20132545fcd97637debd5bb74963f13de474c16cea210171529259f59edaa12c62f4a29d5366057965b55c4ce596
7
- data.tar.gz: 65adad8fab7347dd0b4565f3ef070e78f72b1e21e032e73d6cb685213678d12676e0a514e7b8fdf70b91085486fe152ed8bf6c7043070c5cfc304c33f636ce0b
6
+ metadata.gz: 573cf13ff1e36531d1c32faefb106f8806aa9c16dbe8b72a889e75ab31c51bac255521db6ed274a98ac77a725fb3a9bba215df169b55976d23b1d2a7c7abffe7
7
+ data.tar.gz: 4cf439ffeb22d41a96061813df04826d68b2c20a4016f69507eb9f8e0782a56bd31cf7fb255d2fdc5f475abfe7ceabf32e29271c0770419b4ab784d9d4395e03
@@ -4,41 +4,42 @@ if defined?(EffectiveDatatables)
4
4
  class Logs < Effective::Datatable
5
5
  include EffectiveLoggingHelper
6
6
 
7
- default_order :created_at, :desc
7
+ datatable do
8
+ default_order :created_at, :desc
8
9
 
9
- table_column :created_at
10
+ table_column :created_at
11
+ table_column :id, visible: false
10
12
 
11
- table_column :id, visible: false
13
+ table_column :parent_id, visible: false
14
+ table_column :user, :if => proc { attributes[:user_id].blank? }
12
15
 
13
- table_column :parent_id, visible: false
14
- table_column :user, :if => proc { attributes[:user_id].blank? }
16
+ table_column :status, filter: { type: :select, values: EffectiveLogging.statuses }
15
17
 
16
- table_column :status, filter: { type: :select, values: EffectiveLogging.statuses }
18
+ table_column :message, width: '50%', sortable: false
19
+ table_column :logs_count, visible: false
17
20
 
18
- table_column :message, width: '50%', sortable: false
19
- table_column :logs_count, visible: false
21
+ table_column :details, visible: false, sortable: false do |log|
22
+ log.details.delete(:email)
23
+ tableize_hash(log.details, th: true, sub_th: false, width: '100%')
24
+ end
20
25
 
21
- table_column :details, visible: false, sortable: false do |log|
22
- log.details.delete(:email)
23
- tableize_hash(log.details, th: true, sub_th: false, width: '100%')
24
- end
26
+ table_column :updated_at, visible: false
25
27
 
26
- table_column :updated_at, visible: false
28
+ table_column :actions, sortable: false, filter: false do |log|
29
+ show_path =
30
+ if datatables_active_admin_path?
31
+ admin_effective_log_path(log)
32
+ elsif datatables_admin_path?
33
+ effective_logging.admin_log_path(log)
34
+ else
35
+ effective_logging.log_path(log)
36
+ end
27
37
 
28
- table_column :actions, sortable: false, filter: false do |log|
29
- show_path =
30
- if datatables_active_admin_path?
31
- admin_effective_log_path(log)
32
- elsif datatables_admin_path?
33
- effective_logging.admin_log_path(log)
38
+ if log.logs_count.to_i > 0
39
+ link_to "View&nbsp;(#{log.logs_count}&nbsp;more)".html_safe, show_path
34
40
  else
35
- effective_logging.log_path(log)
41
+ link_to 'View', show_path
36
42
  end
37
-
38
- if log.logs_count.to_i > 0
39
- link_to "View&nbsp;(#{log.logs_count}&nbsp;more)".html_safe, show_path
40
- else
41
- link_to 'View', show_path
42
43
  end
43
44
  end
44
45
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.2.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.0
33
+ version: 2.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.0
40
+ version: 2.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coffee-rails
43
43
  requirement: !ruby/object:Gem::Requirement