Sha256: 5dc95e8765d00b0678a287311824342a1801b1193cbb7926f8dc52c0303d0440

Contents?: true

Size: 357 Bytes

Versions: 2

Compression:

Stored size: 357 Bytes

Contents

class Tweet < ActiveRecord::Base
  has_many :favorites, count_loader: true
  has_many :favs, class_name: 'Favorite'
  has_many :my_favorites, -> { where(user_id: 1) }, class_name: 'Favorite', count_loader: true
  has_many :my_favs, -> { where(user_id: 1) }, class_name: 'Favorite'
  has_many :notifications, as: :notifiable, foreign_key: :notifiable_id
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-precount-0.6.2 test/models/tweet.rb
activerecord-precount-0.6.1 test/models/tweet.rb