File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def engine?
29
29
def primary_resources_url
30
30
if @primary_resource_klass . _routed
31
31
primary_resources_path = resources_path ( primary_resource_klass )
32
- @primary_resources_url_cached ||= "#{ base_url } #{ engine_mount_point } #{ primary_resources_path } "
32
+ @primary_resources_url_cached ||= "#{ base_url } #{ serialized_engine_mount_point } #{ primary_resources_path } "
33
33
else
34
34
if JSONAPI . configuration . warn_on_missing_routes && !@primary_resource_klass . _warned_missing_route
35
35
warn "primary_resources_url for #{ @primary_resource_klass } could not be generated"
@@ -136,7 +136,11 @@ def resource_path(source)
136
136
end
137
137
138
138
def resource_url ( source )
139
- "#{ base_url } #{ engine_mount_point } #{ resource_path ( source ) } "
139
+ "#{ base_url } #{ serialized_engine_mount_point } #{ resource_path ( source ) } "
140
+ end
141
+
142
+ def serialized_engine_mount_point
143
+ engine_mount_point == "/" ? "" : engine_mount_point
140
144
end
141
145
142
146
def route_for_relationship ( relationship )
You can’t perform that action at this time.
0 commit comments