Skip to content

Commit 95a8bf4

Browse files
committed
Merge pull request cerebris#25 from cerebris/setable_fields
Setable fields
2 parents 36eebb7 + ffb152e commit 95a8bf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jsonapi/resource.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ def key(key)
183183

184184
# Override in your resource to filter the updateable keys
185185
def updateable_fields(context)
186-
fields
186+
_updateable_associations | _attributes.keys
187187
end
188188

189189
# Override in your resource to filter the createable keys
190190
def createable_fields(context)
191-
fields
191+
_updateable_associations | _attributes.keys
192192
end
193193

194194
def fields

0 commit comments

Comments
 (0)