Class: Highrise::Subject
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Highrise::Subject
show all
- Defined in:
- lib/highrise/subject.rb
Instance Method Summary
collapse
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
|
#emails ⇒ Object
13
14
15
|
# File 'lib/highrise/subject.rb', line 13
def emails
Email.find_all_across_pages(:from => "/#{self.class.collection_name}/#{id}/emails.xml")
end
|
#label ⇒ Object
21
22
23
|
# File 'lib/highrise/subject.rb', line 21
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
17
18
19
|
# File 'lib/highrise/subject.rb', line 17
def upcoming_tasks
Task.find(:all, :from => "/#{self.class.collection_name}/#{id}/tasks.xml")
end
|