Class: ForestLiana::IntercomAttributeSerializer
- Inherits:
-
Object
- Object
- ForestLiana::IntercomAttributeSerializer
- Includes:
- ForestAdmin::JSONAPI::Serializer
- Defined in:
- app/serializers/forest_liana/intercom_attribute_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
69 70 71 |
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 69 def format_name(attribute_name) attribute_name.to_s end |
#relationship_related_link(attribute_name) ⇒ Object
81 82 83 |
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 81 def (attribute_name) nil end |
#relationship_self_link(attribute_name) ⇒ Object
77 78 79 |
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 77 def relationship_self_link(attribute_name) nil end |
#self_link ⇒ Object
61 62 63 |
# File 'app/serializers/forest_liana/intercom_attribute_serializer.rb', line 61 def self_link "/forest#{super}" end |
#type ⇒ Object
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 |