recourse 5.12.1 → 5.12.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 +4 -4
- data/lib/recourse/helpers/tabs.rb +7 -6
- 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: 6dde202165a7bfa0c497a0ae06b118b3108536014fe7b439c6ef0f658f2bb295
|
|
4
|
+
data.tar.gz: 17d8781fda77d53d5bdf01199146342be707f634b955259a4499969c0341fdd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: adf3b5711fd9327cde802204c2d0a3a69c8943b602e133ba66863106a621719c46dc507706de2bfedc42116e5f97dcf751fa8a333c772c8b71fa747cb4e7d087
|
|
7
|
+
data.tar.gz: 41d333d13e8e3d5645b3314c8ef2ab61137fae5cf381e4197c7598893e45c188e624a5eafb3dd1fc813e39adf504448357726bf4c9b1028e663f37f63e2d8e49
|
|
@@ -22,14 +22,15 @@ module Recourse
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# `Messages`, and `Booked messages` where a namespace leads — the same shape
|
|
25
|
-
# the counted tab keeps.
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
25
|
+
# the counted tab keeps. The model's own word either way, plural for an index and
|
|
26
|
+
# singular for the one record a singular resource keeps, humanized off the path
|
|
27
|
+
# only where the name resolves to no model: a tab reading `Zips` beside a sidebar
|
|
28
|
+
# reading `ZIPs` is one resource called two things. That singular is the word the
|
|
29
|
+
# bare action's button takes, from the same split, so a tab and a button under one
|
|
30
|
+
# record cannot come to disagree about what the resource is called.
|
|
30
31
|
def routed_tab_name(name, namespace, action)
|
|
31
32
|
lead = namespace_words namespace
|
|
32
|
-
title = action == :show ? Recourse.known_singular(name) : name
|
|
33
|
+
title = action == :show ? Recourse.known_singular(name) : Recourse.known_title(name)
|
|
33
34
|
title = Recourse.downcase title if lead.present?
|
|
34
35
|
|
|
35
36
|
[lead.presence&.upcase_first, title].compact.join ' '
|
data/lib/recourse/version.rb
CHANGED