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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54cfa6b7582851195ca4efa3cba8f84bbb4f1d4f064df0e0ed7827d2878c9642
4
- data.tar.gz: 2d8c9abc0af15288204c2c8fd190d36717ff2c5d6fd2b9d1cef4d1dff0d0ab66
3
+ metadata.gz: f72f743e334595c49a1bfd3c2faf2a7751106cbbf7db00e26df9ea6f676e0d9c
4
+ data.tar.gz: f370970c8934b50efc3c63b16cd7aaa8e6314334cbf7b71a76794567b69011ff
5
5
  SHA512:
6
- metadata.gz: 10d8633d5579d29799a981f465fefd14341e8165c124c008f75e1598b8e7001bccb7960fb3a79fcda915587296ff8aec627446ff733059cda3e548ab2480ab30
7
- data.tar.gz: 3f9af3b0200fa6a4d58ce70c955a95e40296a9332f58f8773d31987911b9254fc83e6b7bddabdb0a8380ba2e7768a37abb7620287848d1f8150fd2c6657d1802
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))
@@ -132,7 +132,9 @@ module Alchemy
132
132
  end
133
133
 
134
134
  def namespaced_resource_name
135
- @_namespaced_resource_name ||= namespaced_resources_name.singularize
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "5.0.3"
4
+ VERSION = "5.0.4"
5
5
 
6
6
  def self.version
7
7
  VERSION
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.3
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-01-12 00:00:00.000000000 Z
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