Class: ActivityNotification::ORM::Dynamoid::Subscription

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::AttributeAssignment, Association, DynamoidExtension, SubscriptionApi, Dynamoid::Document
Defined in:
lib/activity_notification/orm/dynamoid/subscription.rb

Overview

Subscription model implementation generated by ActivityNotification.

Constant Summary collapse

@@date_time_dumper =

Initialize without options to use Dynamoid.config.store_datetime_as_string github.com/Dynamoid/dynamoid/blob/master/lib/dynamoid/dumping.rb

::Dynamoid::Dumping::DateTimeDumper.new({})

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SubscriptionApi

#as_json, #optional_target_names, #subscribe, #subscribe_to_email, #subscribe_to_optional_target, #subscribing_to_optional_target?, #unsubscribe, #unsubscribe_to_email, #unsubscribe_to_optional_target

Methods included from Association

#update

Methods included from DynamoidExtension

#becomes

Class Method Details

.convert_time_as_hash(time) ⇒ Integer, String

Convert Time value to store in database as Hash value.

Parameters:

  • time (Time)

    Time value to store in database as Hash value

Returns:

  • (Integer, String)

    Converted Time value



76
77
78
# File 'lib/activity_notification/orm/dynamoid/subscription.rb', line 76

def self.convert_time_as_hash(time)
  @@date_time_dumper.process(time)
end

Instance Method Details

#targetObject

Belongs to target instance of this subscription as polymorphic association using composite key.

Returns:

  • (Object)

    Target instance of this subscription



20
# File 'lib/activity_notification/orm/dynamoid/subscription.rb', line 20

belongs_to_composite_xdb_record :target