ndr_error 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dd7e6a0913bf10fcf2b1a3aac9f963f201f4f32d3fb59adf874a4a6eac51736
4
- data.tar.gz: a3492d3af1d28af880fbf560d6419e3c4ea8eca38e562d872174c53f7ccfb690
3
+ metadata.gz: 6aeadb1fe389fc0c885ef62953faec9f0eb0c7bdf031834a3549e5e220443d52
4
+ data.tar.gz: 80404210a0ff437c92d597be6f31a749bc65de7028f6073f4f7e7d3df3bc33b5
5
5
  SHA512:
6
- metadata.gz: 9285560f82cc42c548f3c36ce93763c64e5c9b354a42d39475c6d826fa03c65ca794a5ff5465ee89e411dc7e764079d26c32fc723d6ee90057e6a461b995c64b
7
- data.tar.gz: 6ff76ea64127ba4fb70828ccc0edb7993c80c5d5d793cf1a64d83bb6f74e54e53edaab15f9bffd58818f7c28cc65920762447cceebc3278fd8e2354239173f5f
6
+ metadata.gz: f5cc032662979dad8c35ce8f85f6b983243bde3baca412884bbb549dca29d65bef5adf463a66bb7b0c3a2e72683ab767235ed197a816a41d9885ed03c3da8bfb
7
+ data.tar.gz: b5b7c8a71db149a3e0cfc30f091c49bc9616cac2d7184a9af66a12a63b4110a95efc2b6d947c17c6a22154763d05c6a955e679baae02bde5ccd8859f78a08fa2
@@ -1,5 +1,3 @@
1
- require 'ndr_ui'
2
-
3
1
  module NdrError
4
2
  # Global controller logic
5
3
  class ApplicationController < ActionController::Base
@@ -8,20 +8,23 @@ module NdrError
8
8
 
9
9
  belongs_to_options = {
10
10
  class_name: 'NdrError::Fingerprint',
11
- foreign_key: 'causal_error_fingerprintid'
11
+ foreign_key: 'causal_error_fingerprintid',
12
+ inverse_of: :caused_error_fingerprints
12
13
  }
13
14
  belongs_to_options[:optional] = true if Rails::VERSION::MAJOR > 4
14
15
  belongs_to :causal_error_fingerprint, belongs_to_options
15
16
 
16
17
  has_many :caused_error_fingerprints,
17
18
  class_name: 'NdrError::Fingerprint',
18
- foreign_key: 'causal_error_fingerprintid'
19
+ foreign_key: 'causal_error_fingerprintid',
20
+ inverse_of: :causal_error_fingerprint
19
21
 
20
22
  has_many :error_logs,
21
23
  -> { latest_first },
22
24
  autosave: true,
23
25
  class_name: 'NdrError::Log',
24
- foreign_key: 'error_fingerprintid'
26
+ foreign_key: 'error_fingerprintid',
27
+ inverse_of: :error_fingerprint
25
28
 
26
29
  validate :ensure_ticket_url_matched_a_supplied_format
27
30
 
@@ -15,7 +15,8 @@ module NdrError
15
15
 
16
16
  belongs_to :error_fingerprint,
17
17
  class_name: 'NdrError::Fingerprint',
18
- foreign_key: 'error_fingerprintid'
18
+ foreign_key: 'error_fingerprintid',
19
+ inverse_of: :error_logs
19
20
 
20
21
  scope :deleted, -> { where("status like 'deleted%'") }
21
22
  scope :not_deleted, -> { where("(status is null) or (status not like 'deleted%')") }
@@ -1,5 +1,7 @@
1
1
  require 'active_support/all' # TODO: want duration
2
2
 
3
+ require 'ndr_ui/engine'
4
+
3
5
  require 'will_paginate'
4
6
  require 'will_paginate/array'
5
7
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Contains the version of NdrError. Sourced by the gemspec.
4
4
  module NdrError
5
- VERSION = '2.0.2'.freeze
5
+ VERSION = '2.0.3'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_error
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - NCRS Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-16 00:00:00.000000000 Z
11
+ date: 2019-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails