lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.1.0 vs lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.1.1
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require_relative 'relation'
+require_relative 'query'
module LedgerSync
module Domains
class Serializer < LedgerSync::Serializer
class Struct
@@ -21,10 +21,10 @@
define_method('valid?') { resource.valid? }
define_method('errors') { resource.errors }
define_method('to_hash') { hash }
references.each do |args|
define_method(args.hash_attribute) do
- Relation.const_get(
+ Query.const_get(
args.type.class.to_s.split('::').last
).new.proxy(
serializer: args.type.serializer.new,
resource: resource,
attribute: args.resource_attribute