Sha256: 6eb450a6aee74984b14dd63f24e93dfb68aa70f65f258e71db4728ab15ed1107

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

module ActsAsIcontact
  # 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.)
  class MessageOpens < Subresource
    include ReadOnly
    
    alias_method :message, :parent
    
    # Retrieves the contact pointed to by this message record's contactId.
    def contact
      @contact ||= ActsAsIcontact::Contact.find(contactId.to_i) if contactId.to_i > 0
    end
 
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
SFEley-acts_as_icontact-0.4.2 lib/acts_as_icontact/resources/message_opens.rb
SFEley-acts_as_icontact-0.4.3 lib/acts_as_icontact/resources/message_opens.rb
acts_as_icontact-0.4.3 lib/acts_as_icontact/resources/message_opens.rb
acts_as_icontact-0.4.2 lib/acts_as_icontact/resources/message_opens.rb