Class: IContact::Contact
- Inherits:
-
Object
show all
- Includes:
- Model
- Defined in:
- lib/i_contact/contact.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Model
#normalize_attrs, #persisted?, #save, #save!, #serialized_attributes
Class Method Details
.unlisted(options = {}) ⇒ Object
26
27
28
|
# File 'lib/i_contact/contact.rb', line 26
def unlisted(options = {})
parse(get({:unlisted => true}.merge(options)))
end
|
Instance Method Details
#destroy ⇒ Object
19
20
21
22
23
|
# File 'lib/i_contact/contact.rb', line 19
def destroy
if persisted?
connection.post(path("#{self.class.resource_name.demodulize.pluralize}/#{self.attributes[self.class.key_attr.to_s]}"), {:status => 'deleted'}.to_json)
end
end
|