discerner 2.0.9 → 2.0.10
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
|
+
NzMxZmQzMjg2YmRmNmFjY2ZkZDE2NzFmZjJkZjNjMjNmOTg5MDkzNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDNiZjQ3NzYwOGVmOWNmNjUxYTAyMjE0OGY2YTJmODY1MWNiZDdiZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTM1YTgwN2E3NzM5OGYwNzM2ZTRiMmEzMWJlZWY1NzM3ZWIzNjliMDk0M2Ex
|
10
|
+
ZTJhOTE4MDJiNGQwYzMzYWFmNGQ0NWQxYmQwYmYxYTlhODk0MjgzMDdjYWIw
|
11
|
+
YWMzNWRhNmMyMzZiMzNlYmM2OTRlZmZkM2FkZjViMDU2ZjgwNjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWRlZDU2ZDY5OTg4NGQ3YzA2NmU0ZTE4NmNjODQ4ZTdiNzgzYzUzNTJkYzNk
|
14
|
+
MDExYmJiNmMwNTc3YTRkYzE2NDZiYWQzMDAzZmM0NTI1OWZkYWMxYWFlMDcz
|
15
|
+
YmI4ZjFiYTRiNjM0YzVlOGEyNWU5NmMxZDE2ZGYxNzU5OTViNDc=
|
@@ -24,6 +24,7 @@ module Discerner
|
|
24
24
|
|
25
25
|
# Hooks
|
26
26
|
base.send :after_commit, :update_associations, on: :update, if: Proc.new { |record| record.previous_changes.include?('deleted_at') }
|
27
|
+
base.send :after_commit, :mark_search_updated
|
27
28
|
end
|
28
29
|
|
29
30
|
# Instance Methods
|
@@ -110,8 +111,6 @@ module Discerner
|
|
110
111
|
end
|
111
112
|
end
|
112
113
|
|
113
|
-
|
114
|
-
|
115
114
|
private
|
116
115
|
def update_associations
|
117
116
|
search_parameter_values.each do |r|
|
@@ -119,6 +118,13 @@ module Discerner
|
|
119
118
|
r.save
|
120
119
|
end
|
121
120
|
end
|
121
|
+
|
122
|
+
def mark_search_updated
|
123
|
+
if (self.destroyed? || !previous_changes.empty?) && search
|
124
|
+
search.updated_at = Time.now
|
125
|
+
search.save!
|
126
|
+
end
|
127
|
+
end
|
122
128
|
end
|
123
129
|
end
|
124
130
|
end
|
@@ -22,6 +22,7 @@ module Discerner
|
|
22
22
|
# Hooks
|
23
23
|
base.send :before_validation, :cleanup_parameter_values
|
24
24
|
base.send :after_commit, :destroy_if_deleted_parameter_value, on: :update
|
25
|
+
base.send :after_commit, :mark_search_updated
|
25
26
|
end
|
26
27
|
|
27
28
|
# Instance Methods
|
@@ -121,6 +122,13 @@ module Discerner
|
|
121
122
|
errors.add(:base, "Operator has to be selected for parameter values that do not belong to list or combobox") if operator.blank?
|
122
123
|
end
|
123
124
|
end
|
125
|
+
|
126
|
+
def mark_search_updated
|
127
|
+
if (self.destroyed? || !previous_changes.empty?) && search_parameter && search_parameter.search
|
128
|
+
search_parameter.search.updated_at = Time.now
|
129
|
+
search_parameter.search.save!
|
130
|
+
end
|
131
|
+
end
|
124
132
|
end
|
125
133
|
end
|
126
134
|
end
|
data/lib/discerner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discerner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Gurley, Yulia Bushmanova
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|