graph_starter 0.11.0 → 0.11.1
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 +4 -4
- data/app/assets/javascripts/graph_starter/application.coffee.erb +0 -2
- data/app/models/graph_starter/asset.rb +8 -4
- data/app/views/layouts/graph_starter/_change_permissions_modal.html.slim +1 -1
- data/app/views/layouts/graph_starter/application.html.slim +2 -2
- data/lib/graph_starter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ec68f902c939f0d9fa77a0bd809f7bd028306a4
|
4
|
+
data.tar.gz: 8f25eef0ecd140167da7192396ffbb35f6df2ce1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e953e46300491928880f94d64fde22b4668f9a086a977c927a320c02810f811f69100c2586b4313f9c568d274ae2d166087ca1b7a0ea844eb42763cff9aa2066
|
7
|
+
data.tar.gz: a7a320754fcbde4de9e04e5c4b04bd40e5d1206e402119cf52f51576a367b5af242345dcfb2c02ccc0808dcfa849b35214995b25ac809883da2c7774eec0594d
|
@@ -304,12 +304,16 @@ module GraphStarter
|
|
304
304
|
require 'graph_starter/query_authorizer'
|
305
305
|
|
306
306
|
query, associations = if category_associations.size > 0
|
307
|
-
|
307
|
+
query = all(:asset).query
|
308
|
+
|
309
|
+
query = category_associations.each_with_index.inject(query) do |query, (association_name, i)|
|
308
310
|
category_association = self.associations[association_name]
|
309
|
-
"(asset)#{category_association.arrow_cypher}(category:#{category_association.target_class})"
|
310
|
-
|
311
|
+
clause = "(asset)#{category_association.arrow_cypher}(category:#{category_association.target_class})"
|
312
|
+
|
313
|
+
query.optional_match(clause).with(:asset, "#{"categories#{i-1} +" if i > 0} collect(category) AS categories#{i}")
|
314
|
+
end.unwind(category: "categories#{category_associations.size - 1}")
|
311
315
|
|
312
|
-
[
|
316
|
+
[query,
|
313
317
|
[:asset, :category]]
|
314
318
|
else
|
315
319
|
[all(:asset),
|
@@ -40,8 +40,8 @@ html
|
|
40
40
|
|
41
41
|
= yield
|
42
42
|
|
43
|
-
|
43
|
+
/- if @current_user_is_admin
|
44
44
|
#change-object-permissions
|
45
45
|
|
46
|
-
|
46
|
+
/- if !request.env['HTTP_X_XHR_REFERER']
|
47
47
|
= render partial: 'layouts/graph_starter/change_permissions_modal', locals: {asset: @asset}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graph_starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|