lib/dato/site/repo/user.rb in dato-0.3.20 vs lib/dato/site/repo/user.rb in dato-0.3.21
- old
+ new
@@ -7,10 +7,12 @@
class User < Base
def create(resource_attributes)
body = JsonApiSerializer.new(
type: :user,
attributes: %i(email first_name last_name),
- required_attributes: %i(email first_name last_name)
+ relationships: { role: { collection: false, type: :role } },
+ required_attributes: %i(email first_name last_name),
+ required_relationships: %i(role)
).serialize(resource_attributes)
post_request '/users', body
end