Closed
Description
I have the following resouce:
class CommentResource < Api::V2::BaseResource
attributes :body
def self.creatable_fields(context)
[:privacy, :body]
end
end
The Comment table has a privacy
column which I allow in the creatable_fields
, but I don't return in the response. When I try to create a Comment I get no implicit conversion of nil into Hash
as response. It seems that I cannot set attributes if they're not set in the attributes array, but I don't want some of them being returned, so it should be accepted since it's present in the creatable_fields array.
Metadata
Metadata
Assignees
Labels
No labels