Module: Core::Io::Base::JsonFormattingBehaviour::Input

Defined in:
app/api/core/io/base/json_formatting_behaviour/input.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: AssociationHandling Classes: ReadOnlyAttribute

Constant Summary collapse

NESTED_SUPPORTING_RELATIONSHIPS =
%i[belongs_to has_one].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object


15
16
17
18
19
20
# File 'app/api/core/io/base/json_formatting_behaviour/input.rb', line 15

def self.extended(base)
  base.class_eval do
    class_attribute :model_for_input, instance_writer: false
    extend AssociationHandling
  end
end

Instance Method Details

#set_model_for_input(model) ⇒ Object


22
23
24
# File 'app/api/core/io/base/json_formatting_behaviour/input.rb', line 22

def set_model_for_input(model)
  self.model_for_input = model
end