Class: Highrise::Subject
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Highrise::Subject
show all
- Defined in:
- lib/highrise/subject.rb
Instance Method Summary
collapse
Methods inherited from Base
url_for
Instance Method Details
#add_note(attrs = {}) ⇒ Object
7
8
9
10
11
|
# File 'lib/highrise/subject.rb', line 7
def add_note(attrs={})
attrs[:subject_id] = self.id
attrs[:subject_type] = self.label
Note.create attrs
end
|
#add_task(attrs = {}) ⇒ Object
13
14
15
16
17
|
# File 'lib/highrise/subject.rb', line 13
def add_task(attrs={})
attrs[:subject_id] = self.id
attrs[:subject_type] = self.label
Task.create attrs
end
|
#emails ⇒ Object
19
20
21
|
# File 'lib/highrise/subject.rb', line 19
def emails
Email.find_all_across_pages(:from => "/#{self.class.collection_name}/#{id}/emails.xml")
end
|
#label ⇒ Object
27
28
29
|
# File 'lib/highrise/subject.rb', line 27
def label
self.class.name.split('::').last
end
|
#notes ⇒ Object
3
4
5
|
# File 'lib/highrise/subject.rb', line 3
def notes
Note.find_all_across_pages(:from => "/#{self.class.collection_name}/#{id}/notes.xml")
end
|
#upcoming_tasks ⇒ Object
23
24
25
|
# File 'lib/highrise/subject.rb', line 23
def upcoming_tasks
Task.find(:all, :from => "/#{self.class.collection_name}/#{id}/tasks.xml")
end
|