Added in_resource method to attribute
Better error handling when resource name cannot be parsed