lib/jsonapi/routing_ext.rb in jsonapi-resources-0.10.0.beta4 vs lib/jsonapi/routing_ext.rb in jsonapi-resources-0.10.0.beta5
- old
+ new
@@ -230,11 +230,11 @@
end
match formatted_relationship_name, controller: options[:controller],
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
action: 'show_related_resource', via: [:get],
- as: relationship_name
+ as: "related/#{relationship_name}"
end
def jsonapi_related_resources(*relationship)
source = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
options = relationship.extract_options!.dup
@@ -248,10 +248,10 @@
match formatted_relationship_name,
controller: options[:controller],
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
action: 'index_related_resources', via: [:get],
- as: relationship_name
+ as: "related/#{relationship_name}"
end
protected
# :nocov:
def jsonapi_resource_scope(resource, resource_type) #:nodoc: