grape-entity icon indicating copy to clipboard operation
grape-entity copied to clipboard

Empty entity is exposing a field

Open Razer6 opened this issue 9 years ago • 1 comments

I have the following empty entity:

class Project < Grape::Entity
end

Although the entity is empty the JSON response contains a field permission:

{
  "permissions": {
    "project_access": null,
    "group_access": {
      "access_level": 50,
      "notification_level": 3
    }
  }
}

This seems very strange to me and I think that is a bug. I am using grape-entity 0.5.1.

Razer6 avatar Jun 23 '16 19:06 Razer6

Indeed that seems odd ;) I would try to write a spec next.

dblock avatar Jun 26 '16 07:06 dblock