Sha256: 83b85d1c80c2da1ed2ba788373f46c81b8591b96d6f064053799af439b82e46a

Contents?: true

Size: 1.05 KB

Versions: 25

Compression:

Stored size: 1.05 KB

Contents

class TwitterAccount < ActiveRecord::Base
  acts_as_taggable_on :tags
  has_many :tweets
  has_and_belongs_to_many :trends
  
  
  has_many :tweet_reactions
  
  has_many :initiations, :foreign_key => 'initiator_id',
                         :class_name => 'TweetReaction',
                         :dependent => :destroy
  has_many :initiators, :through => :initiations                       
  
  has_many :responses, :foreign_key => 'responder_id',
                         :class_name => 'TweetReaction',
                         :dependent => :destroy
  has_many :responders, :through => :responses

  has_many :friendships, :foreign_key => 'friend_id',
                          :class_name => 'TwitterRelationship',
                          :dependent => :destroy 
  has_many :friends, :through => :followerships
                          
  has_many :followerships, :foreign_key => 'follower_id',
                          :class_name => 'TwitterRelationship',
                          :dependent => :destroy
  has_many :followers, :through => :friendships     
  
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pork_sandwich-0.4.23 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.22 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.21 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.20 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.19 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.18 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.17 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.16 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.15 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.14 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.13 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.12 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.11 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.10 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.9 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.8 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.7 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.6 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.5 generators/pork_sandwich_models/templates/models/twitter_account.rb
pork_sandwich-0.4.4 generators/pork_sandwich_models/templates/models/twitter_account.rb