Class: ForestLiana::IntercomConversationSerializer
- Inherits:
-
Object
- Object
- ForestLiana::IntercomConversationSerializer
- Includes:
- ForestAdmin::JSONAPI::Serializer
- Defined in:
- app/serializers/forest_liana/intercom_conversation_serializer.rb
Instance Method Summary collapse
- #format_name(attribute_name) ⇒ Object
- #relationship_related_link(attribute_name) ⇒ Object
- #relationship_self_link(attribute_name) ⇒ Object
- #self_link ⇒ Object
- #type ⇒ Object
- #unformat_name(attribute_name) ⇒ Object
Instance Method Details
#format_name(attribute_name) ⇒ Object
30 31 32 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 30 def format_name(attribute_name) attribute_name.to_s end |
#relationship_related_link(attribute_name) ⇒ Object
42 43 44 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 42 def (attribute_name) nil end |
#relationship_self_link(attribute_name) ⇒ Object
38 39 40 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 38 def relationship_self_link(attribute_name) nil end |
#self_link ⇒ Object
22 23 24 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 22 def self_link "/forest#{super}" end |
#type ⇒ Object
26 27 28 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 26 def type @options[:context][:type] || 'intercom-conversations' end |
#unformat_name(attribute_name) ⇒ Object
34 35 36 |
# File 'app/serializers/forest_liana/intercom_conversation_serializer.rb', line 34 def unformat_name(attribute_name) attribute_name.to_s.underscore end |