lib/alchemy/resource.rb in alchemy_cms-4.4.4 vs lib/alchemy/resource.rb in alchemy_cms-4.4.5

- old
+ new

@@ -129,24 +129,26 @@ def resource_name @_resource_name ||= resources_name.singularize end def namespaced_resource_name - @_namespaced_resource_name ||= namespaced_resources_name.singularize + @_namespaced_resource_name ||= begin + namespaced_resources_name.to_s.singularize + end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes end def namespaced_resources_name @_namespaced_resources_name ||= begin resource_name_array = resource_array.dup resource_name_array.delete(engine_name) if in_engine? - resource_name_array.join('_') - end + resource_name_array.join("_") + end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes end def namespace_for_scope namespace_array = namespace_diff namespace_array.delete(engine_name) if in_engine? - namespace_array + namespace_array.map(&:to_sym) # Rails >= 6.0.3.7 needs symbols in polymorphic routes end # Returns an array of underscored association names # def model_association_names