mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +00:00
Properly adds relationships
This commit is contained in:
parent
215c101c98
commit
159dfc5bc9
@ -60,9 +60,8 @@ module Schemable
|
||||
properties: {
|
||||
type: { type: :string, default: model_definition.model_name },
|
||||
id: { type: :string },
|
||||
attributes: attributes_schema,
|
||||
relationships: relationships_schema ? {} : relationships_schema
|
||||
}
|
||||
attributes: attributes_schema
|
||||
}.merge!(relationships_schema.blank? ? {} : { relationships: relationships_schema })
|
||||
}.compact_blank
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user