recourse 7.12.0 → 7.12.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.
Potentially problematic release.
This version of recourse might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/app/controllers/concerns/recourse/parent_naming.rb +1 -1
- data/app/controllers/concerns/recourse/parent_resolution.rb +1 -1
- data/lib/recourse/helpers/bookmarks.rb +1 -1
- data/lib/recourse/maps.rb +1 -1
- data/lib/recourse/recoursive.rb +1 -1
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3f3474232bc6f128f093102e6695f23e9579ad323bc60bba64fc5bfeb47c5c1
|
|
4
|
+
data.tar.gz: 0ae245a7fd65040853c0ce90112241b19c8a47d053a86d48a513a229e35191ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1087e317accf95b332f2e97f7aee06e22275a0129a2d6d7e8d4b3e35a0cbd84a059ce69e9f265559f6ce2d0ade6bd79b344ecb6dfe1feb86c45710da62c6372d
|
|
7
|
+
data.tar.gz: 55486b544450eaf334cd99d00e81fd493139870780fe78c9d2df90299b44d9a9cd2896a3a8c3e4115a4fb8c3a3929481a7390f876dcd8ea4369f9ffcdf5227c3
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## 7.12.1 - 2026-10-02
|
|
11
|
+
|
|
12
|
+
* [FIX] A model kept in a module is bookmarked and nested under by its route's name
|
|
13
|
+
|
|
14
|
+
The id a bookmark posts and a nested page reads its parent by is named after the route,
|
|
15
|
+
`user_id`, and no longer after the model's whole name, `admin_user_id`, which no route draws.
|
|
16
|
+
A model's default icon and the name its parent is assigned to (`@user`) drop the module too.
|
|
17
|
+
For a model at the top level, all of these read as they did.
|
|
18
|
+
|
|
10
19
|
## 7.12.0 - 2026-10-02
|
|
11
20
|
|
|
12
21
|
* [FEATURE] A route drawn in a module lists the model kept in that module
|
|
@@ -18,7 +18,7 @@ module Recourse
|
|
|
18
18
|
model = path && Recourse.model?(path)
|
|
19
19
|
return unless model && @recourse_parent.is_a?(model)
|
|
20
20
|
|
|
21
|
-
instance_variable_set "@#{model.model_name.
|
|
21
|
+
instance_variable_set "@#{model.model_name.element}", @recourse_parent
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
end
|
|
@@ -27,7 +27,7 @@ module Recourse
|
|
|
27
27
|
model = parent && Recourse.model?(parent)
|
|
28
28
|
return unless model
|
|
29
29
|
|
|
30
|
-
id = request.path_parameters[:"#{model.model_name.
|
|
30
|
+
id = request.path_parameters[:"#{model.model_name.singular_route_key}_id"]
|
|
31
31
|
model.find_by id: id if id
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -83,7 +83,7 @@ module Recourse
|
|
|
83
83
|
|
|
84
84
|
def bookmark_url(record)
|
|
85
85
|
url_for controller: "/#{resource_controller_path}/bookmarks", action: :create,
|
|
86
|
-
"#{resource_model.model_name.
|
|
86
|
+
"#{resource_model.model_name.singular_route_key}_id": record.id
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
end
|
data/lib/recourse/maps.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Recourse
|
|
|
18
18
|
def self.mappable?(model) = placed?(model) || (POINT_COLUMNS - model.column_names).empty?
|
|
19
19
|
|
|
20
20
|
# The layer a model's places are drawn on, or nil for a model that is no geography.
|
|
21
|
-
def self.boundary(model) = BOUNDARIES[model.model_name.
|
|
21
|
+
def self.boundary(model) = BOUNDARIES[model.model_name.element.to_sym]
|
|
22
22
|
|
|
23
23
|
# Whether a model's rows keep a place ID, which an area or a pin at a place is drawn from.
|
|
24
24
|
def self.placed?(model) = model.column_names.include? PLACE_COLUMN
|
data/lib/recourse/recoursive.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Recourse
|
|
|
10
10
|
# The concept a resource is drawn with, which Unicon names in each icon set it
|
|
11
11
|
# knows. A model's own name by default — `contact` draws a rolodex, `job` a hammer
|
|
12
12
|
# — and Unicon answers with a circle for a name it has never heard of.
|
|
13
|
-
def recourse_icon = model_name.
|
|
13
|
+
def recourse_icon = model_name.element.to_sym
|
|
14
14
|
|
|
15
15
|
# Columns the model keeps off its screens — the table, the show page, the
|
|
16
16
|
# form and the search box — none by default. One name or a list:
|
data/lib/recourse/version.rb
CHANGED