File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 6
6
- " RAILS_VERSION=5.1.7"
7
7
- " RAILS_VERSION=5.2.3"
8
8
- " RAILS_VERSION=6.0.0"
9
- # - "RAILS_VERSION=master"
10
9
rvm :
11
10
- 2.3.8
12
11
- 2.4.7
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"
@@ -139,7 +139,11 @@ def resource_path(source)
139
139
end
140
140
141
141
def resource_url ( source )
142
- "#{ base_url } #{ engine_mount_point } #{ resource_path ( source ) } "
142
+ "#{ base_url } #{ serialized_engine_mount_point } #{ resource_path ( source ) } "
143
+ end
144
+
145
+ def serialized_engine_mount_point
146
+ engine_mount_point == "/" ? "" : engine_mount_point
143
147
end
144
148
145
149
def route_for_relationship ( relationship )
You can’t perform that action at this time.
0 commit comments