layers_of_london-booth-map_tool 0.1.2.1 → 0.2

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: 4495369b72bcfe877a3d6ef77ffb8812216250d308c8a243450fd64559060b55
4
- data.tar.gz: 11d34c7bc762629c885a6ac34502cfecee850bcde736b872f26b4da148c35596
3
+ metadata.gz: b80aa4ec60a7404db50858eb839024b1bcb6e9aa52958b9cf0750cdf71ddec73
4
+ data.tar.gz: 486e95c9ffcd95e0cacb831249cc97dc528214c806b554dbe152a96feb7807bd
5
5
  SHA512:
6
- metadata.gz: bd1ff2b16202496c6d1a6ba70f69ffac89c2b06bad2a2503b084815818e5a634285c42ac5546fecc7499ef23e236af923b8de0026c3a61d5fb36ebe6885b9b57
7
- data.tar.gz: c98879375683029aed48d52a986232e1a2d2649b99724986c6282dbd4fa4c79280eedbce213e79b2057e0571e940d4701d3f2be93ae17f94d760c9852dda5bbd
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, 'square' => square.try(:to_json)})
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.user.try(:id) === user.try(:id) && record.square.editable?
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.limit(10).includes(:user, square: [:user]).all.collect do |poly|
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
@@ -1,7 +1,7 @@
1
1
  module LayersOfLondon
2
2
  module Booth
3
3
  module MapTool
4
- VERSION = '0.1.2.1'
4
+ VERSION = '0.2'
5
5
  end
6
6
  end
7
7
  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.1.2.1
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: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2020-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails