Sha256: dd7aa9c3bc4fa1c33977d9fed61b601edad8cbff6e6d2a58193ec1d74d75d666

Contents?: true

Size: 278 Bytes

Versions: 7

Compression:

Stored size: 278 Bytes

Contents

class Tweet < ActiveRecord::Base
  belongs_to :user
  belongs_to :in_reply_to, class_name: 'Tweet', foreign_key: :in_reply_to_tweet_id
  has_many :favorites, count_loader: true
  has_many :replies, count_loader: true, class_name: 'Tweet', foreign_key: :in_reply_to_tweet_id
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activerecord-count_loader-0.3.3 sample/app/models/tweet.rb
activerecord-count_loader-0.3.2 sample/app/models/tweet.rb
activerecord-count_loader-0.3.1 sample/app/models/tweet.rb
activerecord-count_loader-0.3.0 sample/app/models/tweet.rb
activerecord-count_loader-0.2.2 sample/app/models/tweet.rb
activerecord-count_loader-0.2.1 sample/app/models/tweet.rb
activerecord-count_loader-0.2.0 sample/app/models/tweet.rb