Module: Outpost::Aggregator::JsonInput

Extended by:
ActiveSupport::Concern
Defined in:
lib/outpost/aggregator/json_input.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethodsOnActivation

Instance Method Summary collapse

Instance Method Details

#simple_jsonObject

The default simple JSON for all objects. This catches one-to-one and many-to-one associations. It should be overridden for many-to-many associations.



9
10
11
12
13
# File 'lib/outpost/aggregator/json_input.rb', line 9

def simple_json
  @simple_json ||= {
    "id" => self.respond_to?(:obj_key) ? self.obj_key : self.id
  }
end