alchemy_cms 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/alchemy/resource.rb +5 -3
- data/lib/alchemy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f72f743e334595c49a1bfd3c2faf2a7751106cbbf7db00e26df9ea6f676e0d9c
|
4
|
+
data.tar.gz: f370970c8934b50efc3c63b16cd7aaa8e6314334cbf7b71a76794567b69011ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: effc1689a9c747ab521c3d2af854e645c69050846cecef186788c908772f321fd679d0dc2372355651162b2a9837fa91d480121af3d0e4d45cf7505434626373
|
7
|
+
data.tar.gz: '00192ed6cc59f60a1aecb130d2302a5fe074ece729c154167d1b7d3c094c10039032c1382662b819ea72264c2a5c9a3f77ddaf92d784e60297c56360d590f11e'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 5.0.4 (2021-05-06)
|
2
|
+
|
3
|
+
- Use symbols in polymorphic routes for resources [#2087](https://github.com/AlchemyCMS/alchemy_cms/pull/2087) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
|
1
5
|
## 5.0.3 (2021-01-12)
|
2
6
|
|
3
7
|
- Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
|
data/lib/alchemy/resource.rb
CHANGED
@@ -132,7 +132,9 @@ module Alchemy
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def namespaced_resource_name
|
135
|
-
@_namespaced_resource_name ||=
|
135
|
+
@_namespaced_resource_name ||= begin
|
136
|
+
namespaced_resources_name.to_s.singularize
|
137
|
+
end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
136
138
|
end
|
137
139
|
|
138
140
|
def namespaced_resources_name
|
@@ -140,13 +142,13 @@ module Alchemy
|
|
140
142
|
resource_name_array = resource_array.dup
|
141
143
|
resource_name_array.delete(engine_name) if in_engine?
|
142
144
|
resource_name_array.join("_")
|
143
|
-
end
|
145
|
+
end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
144
146
|
end
|
145
147
|
|
146
148
|
def namespace_for_scope
|
147
149
|
namespace_array = namespace_diff
|
148
150
|
namespace_array.delete(engine_name) if in_engine?
|
149
|
-
namespace_array
|
151
|
+
namespace_array.map(&:to_sym) # Rails >= 6.0.3.7 needs symbols in polymorphic routes
|
150
152
|
end
|
151
153
|
|
152
154
|
# Returns an array of underscored association names
|
data/lib/alchemy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2021-
|
16
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|