Class: LayersOfLondon::Booth::MapTool::PolygonPolicy::Scope
- Inherits:
-
Scope
- Object
- Scope
- LayersOfLondon::Booth::MapTool::PolygonPolicy::Scope
- Defined in:
- app/policies/layers_of_london/booth/map_tool/polygon_policy.rb
Instance Method Summary collapse
Instance Method Details
#resolve ⇒ Object
20 21 22 23 24 25 |
# File 'app/policies/layers_of_london/booth/map_tool/polygon_policy.rb', line 20 def resolve features = scope.all.includes(:user, square: [:user]).all.collect do |poly| # user_can_edit = LayersOfLondon::Booth::MapTool::PolygonPolicy.new(user, poly).update? poly.to_json(user_can_edit: user.present?) end end |