lib/alchemy/resource.rb in alchemy_cms-4.4.5 vs lib/alchemy/resource.rb in alchemy_cms-4.5.0
- old
+ new
@@ -129,26 +129,24 @@
def resource_name
@_resource_name ||= resources_name.singularize
end
def namespaced_resource_name
- @_namespaced_resource_name ||= begin
- namespaced_resources_name.to_s.singularize
- end.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
+ @_namespaced_resource_name ||= namespaced_resources_name.singularize
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.to_sym # Rails >= 6.0.3.7 needs symbols in polymorphic routes
+ resource_name_array.join('_')
+ end
end
def namespace_for_scope
namespace_array = namespace_diff
namespace_array.delete(engine_name) if in_engine?
- namespace_array.map(&:to_sym) # Rails >= 6.0.3.7 needs symbols in polymorphic routes
+ namespace_array
end
# Returns an array of underscored association names
#
def model_association_names