Module: FreezeTag::InstanceMethods
- Defined in:
- lib/freezetag.rb
Instance Method Summary collapse
Instance Method Details
permalink #freezetag_deindex_record ⇒ Object
[View source]
34 35 36 37 |
# File 'lib/freezetag.rb', line 34 def freezetag_deindex_record body = { type: self.class.name, id: self.id } HTTParty.delete(API_ENDPOINT, headers: { 'X-API-Key' => self.freezetag_api_key }, body: body) end |
permalink #freezetag_index_record ⇒ Object
[View source]
29 30 31 32 |
# File 'lib/freezetag.rb', line 29 def freezetag_index_record body = { name: self.send(self.freezetag_attribute), type: self.class.name, id: self.id } HTTParty.post(API_ENDPOINT, headers: { 'X-API-Key' => self.freezetag_api_key }, body: body) end |