mirror of
https://github.com/ditkrg/jsonapi-deserializable.git
synced 2026-01-22 22:06:47 +00:00
* Deserialize all fields. * Make blocks return hash instead of using fields method. * Ensure valid payload. * Make reverse mapping available.
16 lines
264 B
Ruby
16 lines
264 B
Ruby
module JSONAPI
|
|
module Deserializable
|
|
class Relationship
|
|
module DSL
|
|
def has_one(&block)
|
|
self.has_one_block = block
|
|
end
|
|
|
|
def has_many(&block)
|
|
self.has_many_block = block
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|