lib/pi_resources/resources_controller.rb in pi-resources-rails-0.5.0 vs lib/pi_resources/resources_controller.rb in pi-resources-rails-0.6.0

- old
+ new

@@ -144,30 +144,34 @@ def destroy_resource_serializer resource_serializer end def resource_collection_resolver - resource_service.all + resource_service.all(ancestry_key_params) end def resource_finder - resource_service.find(resource_key_param) + resource_service.find(ancestry_key_params, resource_key_param) end def resource_creator - resource_service.create(resource_create_params) + resource_service.create(ancestry_key_params, resource_create_params) end def resource_updater - resource_service.update(resource_key_param, resource_update_params) + resource_service.update(ancestry_key_params, resource_key_param, resource_update_params) end def resource_destroyer - resource_service.destroy(resource_key_param) + resource_service.destroy(ancestry_key_params, resource_key_param) end def resource_key_param params[:id] + end + + def ancestry_key_params + {} end def resource_create_params resource_params end