Sha256: 273f8bdf8f8fb31517eeb5df400835937a2511d7daf8f074addc03ae40509c4d

Contents?: true

Size: 285 Bytes

Versions: 2

Compression:

Stored size: 285 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'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-precount-0.6.0 test/models/tweet.rb
activerecord-precount-0.5.1 test/models/tweet.rb