Class: NetworkManager::PostTypeHandler

Inherits:
NetworkManager show all
Defined in:
app/services/network_manager/post_type_handler.rb

Overview

Synchronizing post types with central site

Constant Summary

Constants inherited from NetworkManager

MAIN_HOST

Instance Attribute Summary

Attributes inherited from NetworkManager

#data, #entity

Class Method Summary collapse

Methods inherited from NetworkManager

ignored_attributes, permitted_attributes

Class Method Details

.relationship_data(entity) ⇒ Object

Parameters:

  • entity (PostType)


6
7
8
9
10
11
12
13
14
# File 'app/services/network_manager/post_type_handler.rb', line 6

def self.relationship_data(entity)
  {
    id: entity.id,
    type: entity.class.table_name,
    attributes: {
      slug: entity.slug
    }
  }
end