layers_of_london-booth-map_tool 0.1.2.1 → 0.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80aa4ec60a7404db50858eb839024b1bcb6e9aa52958b9cf0750cdf71ddec73
|
4
|
+
data.tar.gz: 486e95c9ffcd95e0cacb831249cc97dc528214c806b554dbe152a96feb7807bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b147353e4e725fdfb282e2b51d995aad20784042c051a15ef1949e7d479f5e6e024db5ca86b874562a43ae53e90babb0e0c5bd45458d1776981a9d18d9be6bbc
|
7
|
+
data.tar.gz: 760165a365e4c526080d82d177465214809b003f17b1396a3154981b0204a113dd3ef31b112baa1d44f3a4c594e7da94e2816272bdac0b73537d96ec86dc0a21
|
@@ -9,7 +9,7 @@ module LayersOfLondon::Booth::MapTool
|
|
9
9
|
json_feature = {'properties' => {}}.merge(feature)
|
10
10
|
json_feature.inject({}) do |hash, (k,v)|
|
11
11
|
if k === 'properties'
|
12
|
-
v.merge!({'id' => id, 'userCanEdit': user_can_edit
|
12
|
+
v.merge!({'id' => id, 'userCanEdit': user_can_edit})
|
13
13
|
end
|
14
14
|
|
15
15
|
hash[k] = v
|
@@ -5,7 +5,7 @@ module LayersOfLondon::Booth::MapTool
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def update?
|
8
|
-
user.present? && record.
|
8
|
+
user.present? && record.square.editable?
|
9
9
|
end
|
10
10
|
|
11
11
|
def destroy?
|
@@ -18,7 +18,7 @@ module LayersOfLondon::Booth::MapTool
|
|
18
18
|
|
19
19
|
class Scope < Scope
|
20
20
|
def resolve
|
21
|
-
features = scope.
|
21
|
+
features = scope.all.includes(:user, square: [:user]).all.collect do |poly|
|
22
22
|
# user_can_edit = LayersOfLondon::Booth::MapTool::PolygonPolicy.new(user, poly).update?
|
23
23
|
poly.to_json(user_can_edit: user.present?)
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: layers_of_london-booth-map_tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Hendrick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|