From b74c64c6641620f3646c029127da8bbfa106f334 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 23 Jan 2022 01:01:32 +0100 Subject: [PATCH] Fix order of types for relationship use case options --- lib/use_case/relationship/create.rb | 4 ++-- lib/use_case/relationship/destroy.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/use_case/relationship/create.rb b/lib/use_case/relationship/create.rb index b90a5daf..0918d226 100644 --- a/lib/use_case/relationship/create.rb +++ b/lib/use_case/relationship/create.rb @@ -6,8 +6,8 @@ require "errors" module UseCase module Relationship class Create < UseCase::Base - option :source_user, type: Types::Coercible::String | Types.Instance(User) - option :target_user, type: Types::Coercible::String | Types.Instance(User) + option :source_user, type: Types.Instance(::User) | Types::Coercible::String + option :target_user, type: Types.Instance(::User) | Types::Coercible::String option :type, type: Types::RelationshipTypes def call diff --git a/lib/use_case/relationship/destroy.rb b/lib/use_case/relationship/destroy.rb index ca62cd88..6e04e89a 100644 --- a/lib/use_case/relationship/destroy.rb +++ b/lib/use_case/relationship/destroy.rb @@ -6,8 +6,8 @@ require "errors" module UseCase module Relationship class Destroy < UseCase::Base - option :source_user, type: Types::Coercible::String | Types.Instance(User) - option :target_user, type: Types::Coercible::String | Types.Instance(User) + option :source_user, type: Types.Instance(::User) | Types::Coercible::String + option :target_user, type: Types.Instance(::User) | Types::Coercible::String option :type, type: Types::RelationshipTypes def call