Class: AdminWebHookSerializer
Instance Method Summary
collapse
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#last_delivery_status ⇒ Object
27
28
29
|
# File 'app/serializers/admin_web_hook_serializer.rb', line 27
def last_delivery_status
object.active ? object.last_delivery_status : WebHook.last_delivery_statuses[:disabled]
end
|
#web_hook_event_types ⇒ Object
23
24
25
|
# File 'app/serializers/admin_web_hook_serializer.rb', line 23
def web_hook_event_types
ActiveModel::ArraySerializer.new(object.web_hook_event_types).as_json
end
|