lib/jsonapi/routing_ext.rb in jsonapi-resources-0.0.15 vs lib/jsonapi/routing_ext.rb in jsonapi-resources-0.0.16

- old
+ new

@@ -43,11 +43,15 @@ end end def jsonapi_resources(*resources, &block) resource_type = resources.first - res = JSONAPI::Resource.resource_for(resource_type) + resource_type_with_module_prefix = [ + @scope[:module], + resource_type + ].compact.collect(&:to_s).join("/") + res = JSONAPI::Resource.resource_for(resource_type_with_module_prefix) options = resources.extract_options!.dup options[:controller] ||= resource_type options.merge!(res.routing_resource_options) @@ -144,6 +148,6 @@ end end end end end -end \ No newline at end of file +end