Class: ForestLiana::IntercomAttributeSerializer

Inherits:
Object
  • Object
show all
Includes:
ForestAdmin::JSONAPI::Serializer
Defined in:
app/serializers/forest_liana/intercom_attribute_serializer.rb

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object



69
70
71
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 69

def format_name(attribute_name)
  attribute_name.to_s
end


81
82
83
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 81

def relationship_related_link(attribute_name)
  nil
end


77
78
79
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 77

def relationship_self_link(attribute_name)
  nil
end


61
62
63
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 61

def self_link
  "/forest#{super}"
end

#typeObject



65
66
67
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 65

def type
  @options[:context][:type] || 'intercom-attributes'
end

#unformat_name(attribute_name) ⇒ Object



73
74
75
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 73

def unformat_name(attribute_name)
  attribute_name.to_s.underscore
end