Method: ESP::Tag.for_alert
- Defined in:
- lib/esp/resources/tag.rb
.for_alert(alert_id = nil) ⇒ ActiveResource::PaginatedCollection<ESP::Tag>
Returns a paginated collection of tags for the given alert_id Convenience method to use instead of find since an alert_id is required to return tags.
32 33 34 35 36 |
# File 'lib/esp/resources/tag.rb', line 32 def self.for_alert(alert_id = nil) fail ArgumentError, "You must supply an alert id." unless alert_id.present? from = "#{prefix}alerts/#{alert_id}/tags.json" find(:all, from: from) end |