Class: ActsAsIcontact::MessageOpens
- Inherits:
-
Subresource
- Object
- Resource
- Subresource
- ActsAsIcontact::MessageOpens
- Includes:
- ReadOnly
- Defined in:
- lib/acts_as_icontact/resources/message_opens.rb
Overview
The read-only list of opens attached to every Message. Because of this intrinsic association, the usual #find methods don’t work; this collection must be obtained using the individual message’s #opens method.
Property updates and saving are also prohibited (returning a ReadOnlyError exception.)
Instance Attribute Summary
Attributes inherited from Subresource
Instance Method Summary collapse
-
#contact ⇒ Object
Retrieves the contact pointed to by this message record’s contactId.
Methods included from ReadOnly
Methods inherited from Subresource
cannot_query, #initialize, scoped_find
Methods inherited from Resource
#==, all, #connection, #error, #errors, find, find_by_id, first, #id, #initialize, #inspect, #method_missing, #new_record?, #property_names, #save, #save!
Constructor Details
This class inherits a constructor from ActsAsIcontact::Subresource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActsAsIcontact::ReadOnly
Instance Method Details
#contact ⇒ Object
Retrieves the contact pointed to by this message record’s contactId.
11 12 13 |
# File 'lib/acts_as_icontact/resources/message_opens.rb', line 11 def contact @contact ||= ActsAsIcontact::Contact.find(contactId.to_i) if contactId.to_i > 0 end |