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

Format is "reserved"

Open arempe93 opened this issue 9 years ago • 1 comments

I am using grape, grape entity, and rails together for an api. I have a rails model that has a column, format. When I try to expose this column, I get an error that looks something like -

too few arguments
... /gems/grape-entity-0.5.1/lib/grape_entity/entity.rb:482:in `format'
... /gems/grape-entity-0.5.1/lib/grape_entity/entity.rb:482:in `delegate_attribute'

The entity in question

class Content < Grape::Entity
  expose :id, :guid, :slug, :metadata, :url, :format
end

I am using [email protected] and [email protected]

arempe93 avatar Jun 23 '16 19:06 arempe93

This is the problem with defined functions vs. fields. It should be fixable, I would start by writing a spec.

dblock avatar Jun 26 '16 07:06 dblock